Keyring (a WordPress Plugin) Review

Keyring is a WordPress plugin that is specifically designed for other plugin developers in mind (instead of being used by end-user of a WordPress site). It enables these other developers to integrate with and create authenticated requests to several popular remote services (for example Gmail, Facebook, Instagram, etc) or let the developers extend some common standards (for example OAuth1, OAuth2).

In this post, we briefly give a review of Keyring, its overall design architecture, and what it could bring to the table for the developers. Also, we discuss some areas of improvement that we think Keyring could improve on.

Keyring Features

Let’s imagine you want to integrate Gmail into your site, you want to have a feature in one of your site’s pages that allows visitors to send an email using their Gmail account. You then browse through the documentation on the Google Developer site on how to integrate the Gmail account, you found out that it utilizes OAuth 2.0 [1]. In order for you to implement OAuth 2.0 integration, you need to understand how to request a token, how to exchange a request token to the access token. You also need to implement the required endpoint in your site’s backend to be used as a callback endpoint by Google, you also need to be able to sign and verify the request-response from the Google server to your site. After you finished the token exchange part, you then need to include this token throughout all of your API call to the Google endpoint (and possibly need to refresh the token if it is expired).

Instead of having to worry about the specific and detailed flow of OAuth 2.0, Keyring allows us to use a simple mechanism to handle this integration. From within Keyring, each integration to the remote service is encapsulated with what Keyring calls a Service, so in the case of Gmail integration, we will create something like Keyring_Service_Gmail that extends the Keyring’s base Service (or another child class of that).

<?php

/**
 * Custom Gmail Keyring service
 */
class Keyring_Service_Gmail extends Keyring_Service_GoogleMail {
	const NAME        = 'pistachio-google-mail';
	const LABEL       = 'Google Mail for Pistachio';
	const SCOPE       = 'https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/userinfo.profile'; // See https://developers.google.com/identity/protocols/googlescopes.
	const ACCESS_TYPE = 'offline';

	/**
	 * Get a specific credentials for the Pistachio Gmail
	 *
	 * @return array|null
	 */
	function _get_credentials() {
		if (
			defined( 'KEYRING__PISTACHIOGMAIL_KEY' )
			&&
			defined( 'KEYRING__PISTACHIOGMAIL_SECRET' )
		) {
			return array(
				'redirect_uri' => defined( 'KEYRING__PISTACHIOGMAIL_URI' ) ? constant( 'KEYRING__PISTACHIOGMAIL_URI' ) : '', // optional.
				'key'          => constant( 'KEYRING__PISTACHIOGMAIL_KEY' ),
				'secret'       => constant( 'KEYRING__PISTACHIOGMAIL_SECRET' ),
			);
		} else {
			return null;
		}
	}
}

Every Service in Keyring have a standardized flow on how it connects to the remote service:

  • request_token : the first part of getting the token for the Service
  • verify_token: the verification step for the Service’s token
  • request: actually make the API call that include the token that is needed

Not only for the Gmail / Google case, but this standardized flow is also used for all the Services that Keyring implements. Even in the case of “http-basic”, Keyring also has these flows. Essentially, Keyring implements a Facade [2] for those underlying remote services operations.

Keyring Architectural Limitation

When we were doing a service integration using Keyring, we think that there are some architectural limitations in the Keyring that we think it could improve on.

Every Service is a Singleton

By reading through the documentation of Keyring [3] and actually looking into the source code, we can see that every service is implemented as a Singleton.

// code to get a service by name
$service = Keyring::get_service_by_name( 'pistachio-google-mail' );
// actual code in service.php to initialize the service
static function init() {
		static $instance = false;

		if ( ! $instance ) {
			$class    = get_called_class();
			$services = Keyring::get_registered_services();
			if ( in_array( $class::NAME, array_keys( $services ), true ) ) {
				$instance = $services[ $class::NAME ];
			} else {
				$instance = new $class;
				Keyring::register_service( $instance );
			}
		}

		return $instance;
	}

And also the way it works in Keyring is that once we add our service into Keyring, the service singleton object is auto-initialized and its fields’ entries are filled when the plugin PHP code is loaded.

This approach in Keyring, makes it challenging when we actually want to create a test (using PHPUnit/WPUnit). In some scenarios, when we want to test our newly created Keyring Service, sometimes we want to assert its behavior when we supply that with different kinds of values (for example if the redirect_uri that we give is valid, and another case if it is invalid).

// example test case
class Test_Keyring_Service extends WP_UnitTestCase {
    public function test_valid_redirect() {
        // code to configure the redirect_uri with valid uri
        // .....

        // code to get the service
        $service = Keyring::get_service_by_name( 'pistachio-google-mail' );

        // other code to assert behaviour
        // .....
    }

    public function test_not_valid_redirect() {
        // code to configure the redirect_uri with invalid uri
        // .....

        // code to get the service
        $service = Keyring::get_service_by_name( 'pistachio-google-mail' );

        // other code to assert behaviour
        // .....
    }
}

In Keyring, the field redirect_uri is only populated when the Service is initialized, and because it is a Singleton, the next call of get_service_by_name() will return the already created Singleton object, thus if we want to verify the behavior in different scenarios, we need to make some adjustments to the code (our approach is creating some kind of “setter” function to update the field).

Only One Application Configuration Per One Service

In Keyring, every Service class (classes that extends Keyring’s Service directly or indirectly) can only be configured to use one application detail. In the example of Gmail API, one Service class can only be configured using one OAuth’s applicationkey and secret.

This will create some issues if one would like to configure a Keyring Service (Gmail for example) using multiple application credentials. The vanilla approach in Keyring requires us to create another class to handle this case if needed.

Improvement to Keyring

We think that there are a few areas that can be improved in terms of Keyring’s architectural choice. In this section, we propose some suggestions related to that.

Remove the Singleton For the Service

Instead of forcing the service to have only a Singleton instance, we instead propose for each service to have a “type” and an “identifier”. A “type” in here is similar to what Keyring already have in term of “name” (in vanilla Keyring, the “name” field uniquely identifies the Singleton object). For example in the previous case of our Service (in here we introduce a $service_id field):

class Keyring_Service_Gmail extends Keyring_Service_GoogleMail {
	const NAME        = 'pistachio-google-mail';
	const LABEL       = 'Google Mail for Pistachio';
	const SCOPE       = 'https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/userinfo.profile'; // See https://developers.google.com/identity/protocols/googlescopes.
	const ACCESS_TYPE = 'offline';

	private $service_id;

    public function __construct( $service_id ) {
        $this->service_id = $service_id;
    }

}

By doing this approach, we enable one Service to have a multiple instance of application (with different application’s OAuth detail, for example).

Introduce a Service Registry

After removing the Singleton usage in the Keyring’s Services, we need another way to query and get those Services. Previously in vanilla Keyring we can use the Keyring::get_service_by_name() function, but after removing the Singleton, we need other mechanism as the Service’s name does not uniquely identify an instance of the Service.

Instead, what we can do is to create a Service Registry (an implementation of Registry pattern [4]). This Service Registry will provide some finders function to find our instance of the Service, and also provide function to add a service into its registry. Example:

<?php
class Service_Registry {
	private $registry;

	public function __construct() {
		$this->registry = array();
	}

	public function add_service( $keyring_service ) {
		$this->registry[ $keyring_service->service_id ] = $keyring_service;
	}
	
	public function get_service( $service_id ) {
		return $this->registry[ $service_id ];
	}

    // probably need other functions to find all connected services, or
    // all services with a specific service type
}

Benefit of Improvements

The improvement suggestions that we mentioned in the previous section would be beneficial for a web application that want to have multiple integrations with one service provider. This is because we can easily extend one Service class definition to cater to multiple remote service account details.

The approach also helps in terms of testing the codebase. Because we can have one instance of real implementation of the service and another instance of fake/mock implementation of the service. And because in the test case we have the freedom to create the service instances (or their mock) and add/remove them from the Service Registry, the original limitation of having all the class instances loaded on the code load is eliminated.

In terms of maintainability, we argue that the suggested approach also makes the code more maintainable because it has the benefit of easiness to test. Also because we don’t need to create a new class for each similar service integration, the number of custom Keyring service classes that we create is also reduced.

Case When the Improvements are Best Implemented

As we already discussed in the previous section, the improvements that we mentioned are best implemented in cases when we have a web application that needs to have multiple integrations with one service provider. In another case when we only need one integration (one application credential detail) for one service provider, the improvement that we proposed would have a slight overhead in terms of code refactoring (of the Keyring codebase) and also in keeping track of the inherent multiple instances logic in the codebase (probably the developers will ask why we need to have a service_id, for example).

Supporting Multiple Authentication Choices

Another topic question is how do we support two (or multiple) types of authentication in the application.

In one web application, there is an example of authentication choices that are given to the user (using an email address, Gmail, Facebook, etc.). In order for us to support this kind of multiple authentications, we need to have a separate structure that stores data specific to our web application usage. We can treat it as some kind of User data. This User data then should have a field in it that contains the authentication type (a Service provider, for example: Gmail) and also authentication identifier (specific to related the Service provider, for example: Gmail address).

After doing this, then whenever a user is coming back to our web application (for example logging in), they will choose whatever authentication providers that they like. Our web application will match the authentication identifier that the service provider gives with the data that we have, and return the corresponding User data.

<?php
class User {
	private $user_id;
	private $user_name;
    // other fields specific for User need
    // ....

	// array of Account_Identifier
	private $account_identifiers = array();
}

class Account_Identifier {
	private $keyring_service_name; // for example: 'gmail'
	private $keyring_service_account_identifier; // for example: 'thisismy@email.com'
}

(Note that here we explained in high-level concept using PHP pseudo-code, exact detail implementation will also consider database operation, table structure, performance, etc.)


References

  1. https://developers.google.com/identity/protocols/oauth2
  2. https://en.wikipedia.org/wiki/Facade_pattern
  3. https://dentedreality.com.au/projects/wp-keyring/
  4. https://www.martinfowler.com/eaaCatalog/registry.html

Two Weeks In

It has been two weeks since I started working in Automattic. Overall, it has been a great journey so far, and I am looking forward to the opportunities that I will experience in the upcoming days, weeks, and months.

Home Office Upgrade

One of the nice perks that I utilized is that the company gives an allowance for us to set up our personal home office. Since I and my wife moved to our new house, we haven’t really got a chance to set up a proper home office for us to use for our daily working activities (both I and my wife are working from home most of the time).

old working space setup
old working space setup

My previous working setup consists of putting anything to be used as a working table. Most of the time I utilized an empty box (from a food processor that we have) and put a laptop on top of it. Sometimes, I also use my wife’s breastfeeding pillow (surprisingly, the pillow feels nice).

new (and shiny) working space setup

I can finally say that the new working space that we have is proper enough to support our daily working activities. The full setup that I and my wife use are mostly covered by the allowance that Automattic gives (it mostly covers my working equipment). By the way, a suggestion, if you folks have enough money to buy it, a Herman Miller chair is a game-changer (I use a Mirra 2 chair).

Support Rotation

Every new joiner at Automattic, regardless of the role, will start their first two weeks in a Support Rotation. In the Support Rotation, we are effectively acting as a Happiness Engineer, helping customers from all around the world with their problems.

In the day-to-day activities of being in the Support Rotation, we either answer support tickets that the customers send out or being standby to answer them in live chat settings. One good thing that I’m glad that Automattic has is that the documentation that they have is rock solid, it effectively helps me in doing my role in the support rotation.

In my opinion, the Support Rotation is acting as a unique onboarding experience for the new joiner in the company. Not only does it allow us to have a full two weeks to gather as much information related to the products that Automattic has, but also it acts as a tool for us to understand the customer’s frustrations and pain points when using the said products.

Joining Automattic – Company Behind WordPress

I’m very excited to announce that starting this January 2022, I’ll be a part of a fully distributed team as a Software Engineer at Automattic – The company behind WordPress.com (yay, this blog 🎉), WooCommerce, Tumblr, and more!

As a major contributor to the Open Source community (WordPress powers ~43% of the web), Automattic allows me to explore areas that I’ve been looking for to contribute to the Open Source community (and, of course, getting paid from it). Joining Automattic also made me reflect on my earlier day back in the University when I was tinkering with WordPress, making side projects out of it, both paid and volunteer.

joining Automattic swag

Initial Call with a Recruiter

My experience started when I got an email from one of the recruiters in Automattic. I received several emails and LinkedIn chats related to the new opportunities, but this email captured my interest. Not only because the company is familiar to me, but also because the email mentioned that Automattic is a fully distributed company. At that time, I had no idea that Automattic was operating in a fully distributed way.

The recruiter asked me to fill in a calendar schedule to have a short video call session, and I did. The call was brief and enjoyable. The recruiter explained what they were currently looking for. She also asked me about my previous working experience and my view related to the Open Source community in general. The call was concluded with a step-by-step explanation of the Interview process.

TIP: it is a good idea to do a research of the company before the initial call with the recruiter, also prepare some questions that could be asked at the end of the initial call session

Code Test Phase

After the initial call with the recruiter, Automattic invited me to their Slack (as a guess account, of course). Over there, I was invited into a private channel and all stakeholders related to my recruitment. One of the Automattic members then explains related to the code test phase.

In the code test phase, I was invited to a Github repository. Over there, the detail of the task is highlighted. One nice thing about the code test phase is that the test environment is already created for us (basically, Automattic gave me a virtual environment along with already installed tools and also cloud IDE to work on). I was asked to make an improvement to a WordPress plugin.

TIP: this is where both of your coding style and communication style is being judged. You don’t need any familiarity in PHP or WordPress at all, as everything is easily researched. Communicate all blockers / questions in the Slack channel (they will happily unblock you on that). Make a good commits, and think about the tests on the code.

Trial Phase

This was by far the most unique phase in terms of recruitment from a company that I have ever experienced. After passing the code test phase, Automattic will send you an offer for a trial phase. In this phase, Automattic pays you USD25 / hour to finish a 25-40 hours trial project.

One special thing about the trial phase, and the one that I appreciate, is that Automattic expects you to manage the time you take to finish the project yourself. You can spend weekends only for example, or on workdays, after you finish your actual job, it’s entirely up to you. They also allow you to take a break if you have a personal or a professional responsibility that you need to take care, as for myself, I took a 2-week break in the trial phase because my wife was giving birth to my newborn son (in a sense, a parental leave break). I approximately finish the project in around two months’ time.

As for the project itself, it was about utilizing one WordPress plugin library and building integration with one of Google’s services. The integration involves building an OAuth2 authentication and authorization and understanding the API contract of the aforementioned Google’s service. Also, it is required to have a good approach in terms of the performance of the integration that is created.

TIP: in this phase, they take a deeper look into your coding style and your communication style. Also in my opinion, they also take a look into how you manage your time in doing the project. It is a good idea to communicate your plan to approach the project and your blocker to the Slack channel

Offering

And that’s it! after the trial phase is finished, the last phase is the offering. As for the offering, I had a chat with someone from the Developer Experience team. We discussed my aspiration and my preferences in the team. After a few days, they gave me a team and the related documentation related to the team and asked me whether I’m okay with the team mentioned. So in a sense, I know what team I’ll be joining even before joining the company (which is a good thing!)

After the team is decided, then I have another chat with the HR representative related to the benefit, and the detail of the contract. In the end, they send me a contract and I reviewed and signed it.

Waiting For the First Day

What’s left is to wait for the first day, and welcome to Automattic 😊

To Stop Worrying on Other’s Opinion

We sometimes feel the need for other’s validation on everything that we do. Moreover, we often fear that other people will judge us negatively in what we do for them. These need for validation and fear of other’s judgement possibly could hinder us in giving our best shots in all things that we do. Imagine speaking in one presentation while fearing what the audiences think about us, the feelings are probably comparable.

Asking for constant feedback from others is the first thing that we could do in that condition. Rather than guessing or fearing the worst-case scenario, sometimes it is better to just ask them for a direct comment. A helpful person will gladly provide us with constructive feedback to help us grow to be better.

Yet in other cases, it is hard if not nearly impossible, to ask for direct feedback from the other parties. In this type of condition, it is then better to ask ourselves whether we already give our best shots and the best intention. Finding fulfilment in realizing the fact that we already offer our best effort and not setting our goal for other’s judgement is often enough.

Wishing Things to Happen as They Actually Will

“Don’t seek for everything to happen as you wish it would, but rather wish that everything happens as it actually will—then your life will flow well.” 

Epictetus – The Enchiridion

As I grew older, and hopefully wiser, I’ve come to a realization that it is not the part of praying for too much a thing that disappoints us most when the prayer is not granted. It is actually praying for matters to change outside of our control when we could actually reframe the prayer to affect us instead.

Now, instead of praying to God, the holder of the power to change one’s heart, for other’s changes, I’m praying for a change of mine instead. Acceptance of what life currently have in store, strength to go through the day, and for guidance for what actually destined for me.

On Why to be Actively Grateful

I used to pray for a lot of stuff, and all got fulfilled until it doesn’t.

The funny thing is that we as a human tends to remember the negativity of events rather than the positive side. Try to recall events that occurred in the latest year or two of your life. You are more likely to remember how certain things went wrong rather than how other things made you happy. That is just how our brain works [1].

I am no different. It is hard to forget how things went wrong and saddening throughout my life. It seems so easy for those unwanted events to just pop-up in the thought throughout the days. To recall pleasant memories, however, needs more active work.

Probably that’s why God keeps reminding us in The Book about His favors [2], detailing some of many things around us that we could be grateful of so that we as a human being keep trying our best to have active work in recalling our pleasant memories.

[1] https://www.nytimes.com/2012/03/24/your-money/why-people-remember-negative-events-more-than-positive-ones.html
[2] QS 55

TU Delft Personal Application Essay

20723900305_54337a00c6_k

“The art of war teaches us to rely not on the likelihood of the enemy’s not coming, but on our own readiness to receive him; not on the chance of his not attacking, but rather on the fact that we have made our position unassailable”, This quote from The Art of War by Sun Tzu, as written on one of my Cryptography and Network Security text book, is what made me interested in this particular subject, Cryptography. As a computer scientist, we tend to measure a lot of things, and prepare of one consequences, using a worst case scenario approach. For example: how long a particular algorithm will run, what’s the likelihood of a cloud service failing, what happen when someone read my secret messages. Using worst case scenario mindset, that quote from Sun Tzu is just so in place of thinking on how to prepare from enemies’ attack, or in Cryptography term, Adversaries. We shouldn’t assume that our secret information will stay safe wherever they are, we should take precaution measures to protect them. Because of those motivations I am applying to TU Delft, choosing Master of Science in Computer Science, Software and Technology Track. To this very reason also I am choosing Cryptography and Information Security specialization. 

In the last year of my Bachelor’s program, I finished a thesis titled “Gentry’s Fully Homomorphic Encryption Scheme over Integer and Its Implementation Using the Python Programming Language”. Finishing this in a semester of four months with total credit of 6, I received a perfect score of “A” for both the thesis and the defense. This thesis was about an implementation of currently developed encryption scheme based on a 2009 Ph.D. dissertation of Craig Gentry from Stanford University. In his dissertation, Gentry bring up a scheme of a long awaited idea in the world of Cryptography, Fully Homomorphism in Encryption. This idea firstly posed by Rivest, Adleman and Dertouzous in 1978 yet have not find an implementation, allows us to delegate our data processing to a third party without granting them any of information regarding the data being processed, eliminating the need of fully trusting any third party that process our data. In my thesis, I implemented an integer version of Gentry’s scheme using Python programming language. I chose to use Python because of its availability in any platform, its support in multi paradigm of object oriented and functional programming, and also its features and libraries that ease me in code implementation. I also created some test cases to test the scheme’s performance in variable plaintext and key sizes. 

While browsing to the web pages of Computer Science School in TU Delft, it piqued my curiosity that in TU Delft you have several Special Interest Groups that does research on a lot of interesting subjects, one of the group that make me interested is the one that called Cyber Security Group where one of the research topic there is about Homomorphic Encryption. I got excited because not only it is quite similar with what I studied for my undergraduate thesis, but also this particular group is relatively new group in TU Delft, as new as January 2014, yet it has a lot of promising research topic there, for example: research about Secure Information Sharing, Lightweight Cryptography, and application of Quantum Information Theory. This special interest group focusing on Information Security and especially Cryptography is one of the thing that I hardly find in my previous university or even my country Indonesia, it was uncommon for a student to be interested in Information Security, let alone having special research group that do focused research on that particular subject. I also interested in the fact that in TU Delft you can expand your knowledge by taking a subjects that are not taught as part of our study program by following electives or minors. This is great because I would like to take elective course in Project Management, having worked in a small and new startup company in Jakarta allows me to have a deep knowledge in how a Software projects are done from start until finish, a course in Project Management will help me to re-evaluate my knowledge I gained from work experience and to find out more about other industry related Project Management. 

Information Security, particularly Cryptography, offers broad range of topics that still open for research. Personally, I would choose a topic in Quantum Information Theory. From what I read, Quantum Information Theory differs significantly from classical Information Theory in the term of unit that is used to store the information. In Quantum Information Theory, a qubit, i.e. quantum bit is used as a unit of storing information instead of a bit, this allows the information to be stored as a superposition state and continuous-valued instead of a discrete value of one-state bit. An advancement in Quantum Information Theory and Quantum Computing will also jeopardize most existing used Cryptosystems (for example, an integer factorization problem can be solved in polynomial time using Shor’s algorithm), thus researching a Cryptosystem that can survive beyond Quantum Computer and Quantum Algorithm usage will be interested. Quantum Information Theory also opens a new field in which collaboration with researchers from other discipline, especially Physics as Quantum Mechanic is one of the bleeding edge research topic in that field of expertise. 

I also interested in the topic of Identity Based Encryption and its usage using a biometric data. Usually one uses an email address as the ID in Identity Based Encryption to be used as a public key in the scheme, email is used because it is unique enough in the sense of uniqueness in ownership. This approach however pose a problem because it requires a receiver of a message to have a working email address so that they can derive a public key out of it, in the developing country for example, an access to create and use email address is bounded by internet speed, availability, and also people ability. What if we can use biometric data to uniquely identify each person and thus use it instead as a public key? For example we can use fingerprint scans, retina scans, or even DNA sample from a people and use it as a public key. One of the application of this idea is to be used as a way for a government to store its people data in secret, also enabling them and possibly another person to send a secret information to the people, e.g.: medical histories, tax reports, personal announcement, etc. 

To sum up, a prospect to study in TU Delft will grant me an excellent research opportunity with best of people in the world, allowing me to improve my knowledge and deepen my ability in solving real world problem. It will also give me one chance in a lifetime to bring back knowledge that I attained there to Indonesia, where research in the field of Cryptography and Information Security is still in its early days. Personally, I’m that people who believe in order to change the future we need to take an active part in it, applying to TU Delft is one of my first active parts in changing the future, to be accepted and studying for Master in there are the next steps. 

Prahesa K Setia

TU Delft ’15-’17
LPDP PK-31

On a Wandering Mind

“No retreat offers someone more quiet and relaxation than that into his own mind…..So constantly give yourself this retreat, and renew yourself”

Marcus Aurelius in Meditations

I used to believe that getting out of my daily routines and visiting new places will help my mind find its peace.

It does indeed open up my eyes to differences that this world has to offer, new people with each of their mindsets, utterly different weather conditions, unpleasant yet exciting foods and drinks. But what it does not provide is an escape.

I used to think that by physically getting away from your current condition and location everything would always turn out better than what you already have, get out of your comfort zone they said. But what if you don’t feel comfortable or peaceful in the first place? Does challenging yourself into a new condition to find the aforementioned “comfort zone” might work? It does not, I argue.

What I didn’t realize is that we cannot escape from what resides inside our heads. Wherever we go, no matter how far, our fear, boredom, anxiety may still haunt us.

To find peace, I discovered, is to let ourselves retreat to our own minds. Let our mind think and answer questions that we ask it. Let it wander into its own world without keeping too much attention to what’s happening in the outside world. Let it rest. Let it find its shelter.

DSC00916
an empty bench, a shelter

A Question Left Unanswered

 

quantum_entanglement

They say that a physical entity does not exist until an observer, a conscious one, make a measurement. Prior to that, we can only guess, yet we never know the exact properties of the physical entity. As if the entity knows, and says hello to us a mere mortal with a conscious mind.

“Hey! getting lost in your own mind again?” said a long-haired lady sitting next to me while looking straight at my face. Her brown eyes appear to stare into my soul as if they knew I was lost in my train of thoughts.

“Oh sorry, Kara. I’m listening to you though. So I guess we still have five stops before we arrive there” I said to her, not fully lying, as I still could answer her previous question on when will we arrive at our destination.

“Glad to hear that! I was so sure that you were not paying attention” said Kara while smiling, her round eyeglasses appear to be slightly moved up along. “Thank you for accompanying me today in Amsterdam by the way”.

“Don’t mention it, my pleasure” I answered.

As the blue colored Tram bustles through the city of Amsterdam, I began to get lost in my own mind again. I’ve known Kara for too long to remember. We bumped into each other in this city after losing contact for three years. I suddenly remember those days a few years back when I could just talk to her about anything, mostly about ideas and dreams that I would not be able to talk with other people. Until three years ago we were separated by seven time-zones apart. We share similar goal and interest though, as we both are scientists.

I want her to be with me. I think I am in love with her.

But, does she feel the same? There are only two possibilities: yes or no.

When I was a boy, I used to think that it is possible to make some kind of device to predict someone’s feeling, or consciousness, or whatever it is you call it. After all, we are just a collection of dancing atoms, aren’t we? Only after a doctorate degree and countless of sleepless research night later do I understand the underlying trick of the universe. The universe will always hold a mystery in its core. Even a simple double-slit experiment held a mystery on how does exactly the universe work, as a particle in that experiment appears to be in both upper and lower slit, how could that be?

If she does feel the same, I could imagine our livelong exchange of ideas together. That overwhelming feeling of having the ability to conquer the world, solving any problem that this world needs to be solved. Our joint research together, that power duo this world needs.

If she does not feel the same, we would not meet again after this. The last tram stop would be the last time I see her. I would only be able to see her name in one of her published paper. We would go our separate ways and get lost in our own world.

It seems to me that she is in a superposition of loving me and not loving me. Asking her the question to be with me would collapse that into either one of two.

“Hey we arrived at our destination I think!” Kara said cheerfully as our tram stops. I was losing count on the number of stops, but it seems that this is the correct destination. “Well then, this is it” She continued saying.

Now it would be the time to either ask her or just let the superposition stays.

—–
I previously submitted this fiction to Quantum Shorts 2017, a competition about writing a story about quantum mechanics, check their Twitter at @quantumshorts

First and Last Name: The Most Irritating Fallacy in UX

fb-signup
Facebook sign-up form, why Facebook? why?

First name and last name field in online sign up form is the most irritating fallacy that User eXperience designers made. Period.

Assuming that every single person in the world have first name and last name part is just so wrong and ignorance. Even assuming that a person has name that consists of two or more words is not good (an example: my father’s name only consists of one word). Even if they indeed have name that consists of two or more words, making assumption that the last part of their name is their “last name” (or “surname”/”family name” in western cultures) is not correct approach either (an example: Japanese names generally in the form of “family name” followed by “given name” thus the last part of their naming system is not the “last name” in the sense of family name).

Continue reading “First and Last Name: The Most Irritating Fallacy in UX”