Thursday, June 17, 2021

An Open Letter to the Chairman of the AGM SAVH

I do not agree with the process of AGM which I am required to send in a proxy form appointing you as the trustee to attend the meeting on my behalf.

  1. Why should I appoint you to attend, speak, and vote on my behalf as a proxy. Proxy is someone who I can trust to conduct matters on my behalf. I don't even know you so how could I trust you to conduct on my behalf?
  2. I don't see how the process is fairly handled. A security company is appointed to receive the proxy form. The company collects and submits the form to you. Who can guarantee that they do it fairly and faithfully although sending the letters directly to SAVH is even less secure.
  3. Who can verify the integrity and correctness of the forms. I believe you won't do it by yourself. So if there are no independent witnesses. Who can guarantee the fairness of verification and ensure that there are no alterations to the form?
  4. Who can verify the correctness of vote count or the resolutions when there is no independent witness? 
  5. There is no independent witness while the counting is done. The tally is also not verifiable and is authentic when presented to the AGM since there is no witness to note the tally during the count.
  6. Although submitting questions in advance is constitutional. Since we make you as the proxy, we lost the ability to query during the AGM on the answers given by the relevant party neither do we have the ability to raise issues on matters arising.
  7. Since the votes are submitted in advance, can you be absolutely confident that the resolutions and votes are not leaked to interested parties there by allowing them to manipulate the votes by getting more people to influence the vote count?
  8. The online submission of the proxy form require signature but no instruction on signing the PDF. It requires a Serial number too. Where is the serial number? I don't receive it. Can you be sure that the serial numbers cannot be obtained by interested parties to vote by someone else?
  9. Due to the complex process of signing the adobe PDF, How could a VH able to sign it properly without help? Even a sighted have problem unless they know how to do a signature on a PDF. There is no proper documentation on how it can be done.
  10. Registration online requires an email address. Can you be sure that all your clients have email addresses?
  11. Letters sent to the totally blind cannot be handled by them. Who will help them go through the process? You expect them to find their own helping hand?
  12. You don't have online client login access before so how could you ensure that those who register are really who they say they are? 
  13. You being the president of the Executive Committee is deemed to have vested interest as we are voting in committee members who in turn selects the president. How can you be the one handling the votes singlehanded? Those people whom you engaged are engaged by you. Are they acting honestly? Who can guarantee that? You?
  14. Why is there no option for a group of us to appoint our own proxy who could summarize our resolution decisions and voting choices? At least we could be sure that our forms reach you on the AGM day and submit the forms on the spot accordingly? 
  15. I could be wrongly misled. I heard that the voting process is decided by you alone without the Executive Committee's understanding.  Is it not a process agreed by all members of the committee?
  16. Voting is supposed to be confidential. The proxy form has our names and signature. It is no longer confidential.



Friday, April 02, 2021

What have I done wrong

Although I have quite a few achievements (see my other blog), there were quite a few incidents in my life that is against me. The following are the incidents.

I worked for a textile company. My work attitude caused the management to promote me to a group leader. I was transferred from department to department in increasing importance area. Obviously I become a sore eye to other group leaders. I have no friends in the company but since I am a loner (I am a bit autistic), I really don't care.

During my BMT in the military, I was a temporary IC. Everybody ignored me just because I am a loner that don't mix around. I am sure I did not use my position to boss over them.

At the end of BMT I was told by platoon sergeant to give up the position of "Best Trainee" to a NS men because I am a regular. I don't mind that. But in my heart, I was wondering why the bias. Anyhow, since the NS men is quite close to me (being a fellow jogger), I don't make noise. Even then, I wonder why they ask me. I have no idea that I was nominated "Best Trainee".

While attached to a military school as a temporary lecturer, There were other lecturers that vows to fail me in my next upgrade. I am just doing my job trying to teach the students in my own way. Maybe it is due to me not mixing around that makes them think that I am arrogant. Also I prepared the training material all by myself without consulting the seniors because the old training materials I had is quite lacking and ambiguous on some area. I left the military after my terms of service completed because of this hatred towards me.

In the military camp that I was assigned to and is a IC in a department, I was targeted by a logistics officer who placed bad comments on my military record. I suspects that it was a subordinate of mine that bad mouthed me. There were nothing wrong in my department. No errors, no faults, no complaint yet I was told I did not do my job properly. The reason is probably due to the following paragraph.

For three years I was a "damned" Private who did not get a promotion even though my training qualifies me to be promoted to Lance Corporal.  It was probably due to the Captain (logistics officer) that was condemned so the rest of the camp under him also being condemned. I was subsequently duly prompted to Lance Corporal after a letter was sent to my officer (Captain)  asking for a reason why I was not promoted (as was told by a clerk in the HQ). Surely it is not me who try to pull a string in the higher echelon. Suddenly from a Lance Corporal I was promoted to a Corporal within three months of last promotion while in the training camp. I wasn't due for promotion before I finished my training. This cause the whole training camp to be jealous of me because I was the one and only Corporal in the class. Have I done anything to deserve this?

While attached to an oversea base, I was targeted by an Officer who happened to be be the head of logistics that I am under. I was doing my job properly and did nothing to invoke him. He even orders me to fix telephone lines alone in the middle of a hurricane storm. I guess its the logistics officer back in my military camp in Singapore that is the one who instigated the oversea officer's hatred towards me. He even say right in front of me "You are a Christian, I am a Buddhist. I don't like you". Anyhow, the officer was not able to do any other harm because he probably can't. I did my job properly and watched my back.

In my last year of reservist, I was made a vehicle commander transporting field camp materials back to the camp. All the people assigned to me suddenly deserted me after reaching the camp. I could have put all of them on charge of insubordination but since it is already my last year, I just do the unloading myself and one by one the others creep back to help me unload. At the beginning of my military career and at the end of the career I have people who just ignore me. Well, such is a life of a IC. Pathetic and a total failure because I don't mix around? It probably is because it is an anti-human behavior. I am not a good leader.

While in a technical firm, I was a QA Technician in the QA department. The QA officer find faults with me on the floor being dirty. There was a cleaner that was doing the cleaning. Why complain to me? He was trying to find fault with me because I foolishly pointed out the error (in front of the customer) that he made in a QA inspection level. He placed the level way too high that it is certain that every batch of delivery have to be inspected 100%. I have to voice out immediately before customer accepts the inspection level. Luckily the customer is a military officer that was my superior who rely on me to handle the QA department in the military before it was handed over to the same civilian company that I was in. She accepted my rejection of the inspection level because she knew that it is not feasible to set such a high level. In the end the QA manager steps in to support me because there seems to be problem between the QA officer and QA manager. 

Life was then smoother after the QA officer give up my department totally. I could handle the department myself because I was the IC before it was handed over to the civilian company. Ultimately I left the QA department because of this and that the life is very stale doing QA work.

I was transformed from a Customer Relations Officer to be a supervisor (in an outsourced company). In the process of maintaining the group, I began to write programs that could help the department work more smoothly. It worked so well that the manager began to use the opportunity to boast to the corporate world. Many people follow suit in the same type of work so much so that the corporate IT clamps down on the "shadow IT" work. I ended up being just a shadow in a outsourced company doing the same work. I was still doing the same thing just that officially I am the outsourced company tech that is doing technical work to enhance the company's work not the outsourcing company doing "shadow IT" work. Was it my fault that caused the clampdown?

In the same corporate company I was assigned to set up a whole new Customer Relation Management system including a full fledge web based program to handle customer equipment repair. I worked hard on it but failed on the LED display because my design just could not drive the LED. Luckily I quickly switched over to a TV display using the web method. It was completed just one day before the official launch of the whole program. I was told that my own boss says that "I ask for it". What have I done wrong? I was trying to save the outsourcing company lots of money by doing the whole project in house. This is what I get for doing something that is good for the outsourcing company?

It is strange that quite a number of people volunteer to keep me informed of what is happening around me. I am a loner so I really don't mix around well but I guess it is my no-harm nature that makes them want to talk to me about people wanting to harm me. Also there are people who helped me without reason. I thank God for that.

Now that I am "officially" retired, I looked back and see all the things that happened to me. I compared with those martial art stories' hero. It is exactly the same thing that happens to me. I shined too well that caused jealousy in others so they try to silent me. In other instances, I am just a innocent victim who did not deserve the hatred/dislike.  Well, it is already history so it does not matter anymore.



 

Sunday, March 21, 2021

Javascript Listening for a specific Key press

 If you want to know what key was press in a web page, you will normally do a document.addEventListener('keydown',myFunc) function. However, if you only want to act upon s specific key then the situation is slightly different becauses addEventListener does not have function to return anything.

Fortunately, there is a "bind" function in the event listener. by defining the event listener as

document.addEventListener('keydown',myFunc.bind(event))

In myFunc then you could use event.keyCode to determine which key was pressed and bypass any other.

There is an issue here. You can't capture key combinations. Keys like Alt-s will be passed as two event instead of one thus the function is triggered twice. But for just a simple key press like pressing the space-bar, the script works quite well.





Tuesday, February 16, 2021

Filemaker Making Progressive Limits

 It is not unusual for performing progressive limits. Basically it is just to limit the search by selecting various attributes of the item. For example, in a electronic product, you would want to limit to hand phone, Xiaomi, 4 GB Memory, 256 GB storage to find the price of item that match the criteria. Its like setting filters as you browse the products. 

Most on-line product sellers would allow for filters. Here, the idea is to do it in FileMaker which does not have dynamic content and have difficulty in doing paging without resorting to web based techniques.

Doing filters in FileMaker is not that easy. as lists are not set dynamically according to selected fields. Using SQL to filter is also not that easy as user select different options in various fields.

Below is a simple method of doing progressive filtering. The key in doing that is to force user to select various options in a fixed sequence/

Using the model mentioned above, there are three filters. 1. Model, 2. RAM, 3. Storage. Obviously, in real products there are much more options to choose but for simplicity, only 3 options are shown here.

STRUCTURE

One main table where the filters are set.

One product price table where the Model, Ram and Storage are set.

METHOD

Create a field for each filter in the main table.

Create a list based on Model on the product price table and set "Model" field to select from this list.

In the database Relations tab, create a duplicate product price table. Set the "Model" field of main table to the "Model" field of the price table. Create a list from this duplicate and set it as select list to "RAM" field of the main table. Hide the "RAM" field if "Model" is not selected.

In the database Relation tab again create a second duplicate of the price table. This time Set the "Model" and "RAM" field of the main table to the "Model" and "RAM" field of the price table. Create a list from the second duplicate. Hide the "Storage" field if any of the "Model" or "RAM" is not selected.

In the database Relation tab again create a third duplicate of the price table. This time Set the "Model", "RAM" and "Storage" field of the main table to the "Model", "RAM" and storage field of the price table. Create a script to set the "Price" field of the main table to the "Price" field of the third price table.

In this way the fields are chosen progressively according to the order of the available fields. This relation setting allows user to change various options easily. You only need to ensure that the "Price" field of the main table is blank first every time user make changes on any of the fields unless you want to make the field as the "Price" in the third price table without the script.





Sunday, December 13, 2020

Communicating with Apple Web Services (GSX) via Filemaker 3

 My previous blog talks about communicating with GSX using JSON. There is one area which is not mentioned. This area concerns with security. GSX requires client certificate issued by them and a white-listed IP. They require user to be certified and communicating from an approved IP address.

The white-listing is easy to achieve. Just designate your server/computer as the channel to communicate with GSX. All API requests have to be send from the server/computer. This means that if you require multiple user access, then you must provide a means for all of them to communicate with GSX from the white-listed server/computer from Filemaker using the "Insert from URL" function.

Getting a cert from GSX is done by sending a properly filled CSR to GSX. Note that the Common Name is defined by GSX. It is used to identify user according to GSX format. With the cert, you need to prepare it for use by the server/computer so that you can use it. The following is example done in PHP. The method used is via CURL in PHP.  It is not advisable to use Filemaker to communicate directly with GSX as each "execute from server" means one connection used. You may soon find out you run out of connection on your server. By using "Insert from URL" and calls a PHP server, there is no limit.

Before you could start coding the PHP, you need to prepare your cert for use in CURL. CURL works best with certs in the PEM format. You need to combine the cert and private key into one file by copying and pasting the cert and key into a single pem file.

The following is a typical CURL setting

$ch = curl_init();

curl_setopt($ch, CURLOPT_HEADER, false);

curl_setopt($ch, CURLOPT_VERBOSE, true);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);

curl_setopt($ch, CURLOPT_VERIFYHOST, 0);

curl_setopt($ch, CURLOPT_VERIFYPEER, 0);

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

curl_setopt($ch, CURLOPT_HEASDER_OUT, true);

curl_setopt($ch, CURLOPT_SSSLCERTTYPE, 'pem');

curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'pem');

curl_setopt($ch, CURLOPT_SSLCERT, 'your cert');

curl_setopt($ch, CURLOPT_SSLKEY, 'your key');

curl_setopt($ch, CURLOPT_SSLKEYPASSWD, 'your pass');

You will have to check the documents to see what are the headers required to be sent to GSX. I suggest you send the header settings from your user to the server/computer as JSON then convert the JSON as array with variable name as $headers as shown above. In addition, not all GSX API calls are POST. You need to get user to indicate whether the request is POST or GET.

If it is post then you will need to set the following

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, $content);

curl_setopt($ch, CURLOPT_URL, 'your url');

Since a GET requires CURL GET request, you need to define it with the following.

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

Each API requires the API to be defined as part of the URL. You need to define the URL for each API call. Compose the URL from the user side and send it as a parameter to the server.

curl_setopt($ch, CURLOPT_URL, 'your url');

Finally execute the CURL

$output = curl_exec($ch);

It is a good practice to always close the CURL after every thing is done.

Now CURL may return two different errors. One from CURL itself, the other is from GSX. Your error message have to distinguish between the two.

Before you even start to test the PHP coding, you need to obtain an initial ID from GSX. Therefore, you have to visit https://gsx2.apple.com/gsx/login to sign in and get the ID. This id will be used to obtain the proper ID for subsequent GSX API request by calling the "authenticate token" api then copy the ID returned for subsequent use.

A final oddities is that if you, or your users, use more than one app or one computer that access GSX. Please be reminded that only one ID is provided at anytime. You need to use the same ID for all requests. It is up to you and your user to store such ID in one secure place and use it to consume APIs.







Monday, December 07, 2020

Internet Download Speed is Crawling

 Quite some time ago my win10 browser loading suddenly become sluggish. I check with Ookla Speed Test shows that the download speed is just 6 mbps whereas I subscribed to 1 Gbps. The upload speed is very much faster but still well below the 1 G bit as subscribed.

Tried various methods of finding out why the download is slow but to no avail. Checking the speed on my handphone proved that the router is OK thus not service provider problem. It is only the laptop that has the problem. It really puzzles me as it is not due to browser issue since Ookla has a app that could perform the test without using browser.

After a month or so of intermittent attempts to find the fault, I finally found a clue. Netizens mentioned that SmartByte Network Services could slow down network.

I uninstalled SmartByte and the speed went up to almost 1 Gbps. SmartByte come pre-installed with Dell laptops. There are instructions in the internet that teaches you how to uninstall it. One such example is https://windowsreport.com/smartbyte-services/.




Monday, November 09, 2020

Getting the distance from a QR code with known dimension

 In working towards an app that guide VI to navigate indoors (Blind Navigation System Using QR Code), I am working out the distance of a QR code from the navigator. This will allow the app to works like iBeacon that could tell the distance of navigator from the device.

OpenCV already have methods that could measure object dimension from a known reference. The first step is to convert the known dimension to pixel ratio. This will allow for different camera with different megapixel count. The formula is simple. ratio=pixle/real size of object.

With this constant, I will need to determine the distance from the navigator to the QR code. First I find the QR code then measure the QR Code size. The QR code most likely have to be enclosed within a rectangle so as to allow the measurement of the rectangle. Convert this size (in pixles) by the formula size=pixle*ratio. Viola, we get the distance from the QR code.

Measuring the position of the QR code is an essential metric. This will allow navigator to know the direction towards the QR code. This is easily done by getting the center point of the camera view then get the relative position of the QR code to the center point. We can inform the user whether it is to the right or left. Calculating the distance from the center point is quite meaningless as it is not useful to the navigator.

Unless navigator has a perfect memory of the position of all the QR code, there is a need for a map of the location with precise point of all the QR codes. The app should also allow the plotting of routes from one QR code to another so as to provide a voice guided navigation for the VI.

Deviating from the QR code will be an issue. Unlike iBeacon, once the QR code is not in the camera view, VI is practically lost. A facility to turn VI back to the track has to be made by approximating the last known point.