@adlrocha - Demystifying my writing process

In case you want to launch your own newsletter.

person holding light bulb

This week, for the first time since I started this newsletter, I couldn’t find a topic to talk about. Let’s not fool ourselves, releasing a new piece of writing every single week is a lot of pressure, and it requires the investment of a lot of time and effort (along with outstanding organization skills in order to fit enough small chunks of writing time throughout the week to allow me have a publication ready every Sunday). Some people have asked me, “how do you manage to write a new article every week? You don’t have a life, or what?” Well I do. I have a full-time job, a live, family, friends, and a lot of hobbies, and I am really grateful for this. Fortunately, writing is one of these hobbies. It is true that sometimes I wish I had more time for other things. And I won’t lie, sometimes I feel tempted to kill this newsletter in order to have more time for my other hobbies, but I almost always end up overcoming the instinct.

The reason why I prioritize writing and this newsletter over other of my hobbies? I think it is good for me personally and professionally. Don’t you agree? This newsletter is like my “public journal”. You can have a quick look at all the reported benefits about writing and journaling to understand why all this effort is totally worth it. I actually encourage you to try journaling at least once in your life.

I was thinking about all of this while searching for a topic to write about this week when it came to me, “wait a minute! what a better topic to talk about in these moments of lack of inspiration than this newsletter and how I find the inspiration and time every week to write a new piece?”. So this publication will be an attempt to immerse you in my writing process. Hope you enjoy it and learn a lot from it!

Where do I find inspiration?

I keep in a notebook a backlog of potential topics to talk about. Every time I come up with an idea for the newsletter I noted down. The kind of things I usually write down as “potential fits” for the newsletter can be categorized in:

  • Things I want to learn, revise, or elaborate on. I usually use the newsletter as an excuse to force me learn new things I’ve looking to learn for a while. These are the publications that take me the most, as it requires me to understand deeply the new topic, play with it enough to be able to “teach” the concepts (or at least communicate them in simple terms) through this newsletter. Examples of these are my publication about Enigma, or the ZKP and Lattice Cryptography Games. Estimated time of writing 6-8 hours.

  • Things I learn or use at work, and side projects. As consequence of my daily work I end up coming across problems, interesting concepts, and creative solutions worth sharing, as they may be useful for all of you. Some examples we’ve seen in this newsletter are my newly formed opinion about JS, the development of my Goxyq, or my recent love for WASM. Estimated time of writing 5 hours.

  • Personal experiences, reflections and opinions: One type of publication I enjoy the most writing are those in which I share personal experiences and opinions. They are the most conflicting topics to talk about as they are significantly subjective, so some people love them, and others hate them (to the extent of “DMing” me clearly stating their discontent with my publication). Of this kind you may remember my attempt to formalize what happiness at work mean, my dissection of tech conference, or my tale of donkeys and lions. Estimated time of writing 2-3 hours.

  • News analysis, new ideas, and trends: The news are a great source of inspiration for my publications. My two main sources of news are HackerNews and Twitter. With news I don’t mean the consequences of Trump’s last tweet or the economical implications of CoVid-19. Although interesting, these topics do not belong to my field of expertise, so I don’t feel comfortable analyzing these type of news. I usually go for tech news and trends I can discuss about such as the pieces I dedicated to serverless technology, decentralize finance or Libra. Estimated time of writing 3-5 hours.

How do I write my publications?

With my topic backlog built, according to the potential time I have in the week (which depends on several constraints: meetings, appointments, amount of work for the week, errands, training, my weekend basketball games, gettings together with family and friends, etc.), I chose the topic I will talk about for the week. How I usually approach the writing of publication is as follows:

  • Depending on the specific topic the first thing I do is a bit of research. Even if the topic belong to the group of “personal experiences, reflections and opinions” of my backlog, I like to explore what other’s have written about the topic to confront my views on the matter. When the topic is from the bucket of “news analysis, new ideas, and trends” there is usually a first news, article or publication that serves as a foundation for the research process, and to start writing a first draft.

  • With all the initial research done, I write a first draft of the publication where I figuratively “puke” all the content I want to include in the article. This gives me a solid first draft for the piece in terms of structure and content. I usually give a preliminary title and subtitle to my publications before starting writing to set a groundwork of what I want to talk about. However, after my “puking” process, and with a global view of the content and structure, I usually change the title a few more times to make it attractive and make it perfectly fit the content.

  • I have a title, a subtitle and a first draft of the publication. It is the perfect moment to make it pretty with a few images from unsplash that fit the content.

  • I perform then a thorough revision of the first draft, emphasizing the most interesting parts of the publication to help its reading (and to allow my most lazy readers to get a slight idea of the topic of the article after a quick skim). In this step is where I give consistency to the whole text and structure that may have ended up a bit messy and hard to understand after the first draft. With this, I am ready to include complementary references (if applicable) for my top of the class readers.

  • Finally, I make a last quick reading to check that the speech is consistent, there are no big typos or weird constructions… and we are ready to go! Click send!

And when?

Here’s the critical point, and in my opinion the main reason why there is a lot of variation in the quality of my publications. I try to plan a few (potential) writing slots in the week first thing Monday morning according to my planned schedule. Some weeks I manage to find throughout the week a few small slots to start my research and a full free slot of three to five hours in the weekend to work in my writing. This is the perfect (and my preferred) setup, because it allows me to be completely focused for a few hours straight to write. This setup is when my highest quality publications are produced, and this why the weeks that this happen is when I try to plan topics from my “things I want to research” bucket, which require more focus from my part.

Unfortunately, this is not always possible, and there are weeks when I don’t have a lot of time for research, and my busy weekend only allows me to allocate small one-hour slots for writing (before lunch, before meeting some friends, after my basketball game, before going to sleep, after cleaning my place, etc.). These are moments where my focus is limited, but they are the only ones available and I can’t waste them if I want to have a brand new article every week. Under this scenario is where I produce my lowest quality pieces of writing. Hence, I try to allocate shallow or easy to write topics for this weeks, where the require focus is not big, and is more like writing a personal diary than a proper technical publication.

And what if you can’t find the time?

Of course, there are weeks when I don’t have time to write at all. For these weeks I have a few resources to prevent me from skipping a week of the newsletter:

  • The Lazy Publications: Sometimes I only have a full hour to write in the weekend (or I don’t feel like writing at all), but I managed to do a lot of random research throughout the week, either because I had to for work, or because I was trying to find some inspiration for future publications. In this case, what I usually do is a “Lazy Publication” where I share interesting references I may have found throughout the week. In the past year, I just had to use this resource once. It didn’t have a lot of success, but my plan is to try and enhance my Lazy Publications in order to make them a bit more attractive. Estimated time to get the newsletter ready: 1 hour.

  • #ICYMI Series: This is a wildcard publication where I share a compilation of my top previous articles In Case you have Missed them/It (ICYMI). I haven’t have to resort to this resource yet, but the closest thing I’ve done to this (for you to get the concept) is my 2019 review of the newsletter. Estimated time to get the newsletter ready: 15-30 min.

  • My Medium publications: Before launching this newsletter, I periodically wrote in Medium. I have a few interesting articles there I haven’t shared yet with my newsletter audience. So whenever there’s a week I don’t have time to write properly, I recycle one of these articles and get it pretty and updated for this newsletter. Estimated time to get the newsletter ready: 30 min.

So this is what happens behind the scenes of the publications you receive every Sunday in your inbox. Any idea how I could improve even most this process?

@adlrocha - What does happiness at work mean?

An unscientifical and personal approach.

woman biting pencil while sitting on chair in front of computer during daytime

I was doing some of my Sunday lazy reading through Twitter when I came across the following “tweet-report” about the kind of jobs that make people happier, and it triggered one of my lifelong obsessions. It was my random call to action. I consider myself significantly happy at work, but I have always wondered, can we objectively measure and quantify the attributes of a job that influence happiness in order to build some kind of (completely subjective and “unscientifical”) recipe to help people target jobs which can potentially bring them more happiness?

For those of you who don’t know me or my background (hopefully lots of you, as that would mean that not only my family and friends read my posts), I started my professional life working as a researcher at university, until I moved to the corporate world, where I have always been involved with innovation and R&D (visit my Linkedin for further details). After interacting with people through my professional life I have realized the following: people with a clear mission or goal are happier in their jobs. My “business owner” friends, as well as my colleagues at R&D and University all have missions, they work with a clear target in mind. They don’t work for the sake of working or “simply earning money”, they wake up every day with a goal in mind that motivates them. And they, as me, seem really happy about it. They are happy about being obsessed with their job and their mission.

Let me build up on this for a moment. According to the aforementioned report, people at white collar jobs are generally happier than people at blue collar jobs (let me add that I hate this way of classifying jobs, but it comes pretty handy for my current discussion). This seems like a clear result of what I just mentioned. Blue collar workers definitely work for money. They most probably aren’t aligned with their employers or companies’ goals, and they see their jobs as monotone means for making a living, without a mission in mind.

White collar workers, or at least the ones I’ve met which curiously all had clear missions, on the other hand, see their jobs as a challenge and a mean to reach their personal goals. This motivates them to wake up early every day, and happily go to work. A mission can range from “building a passive mean of income to be the owner of my time” (personal), to “curing malaria and putting an end to hunger in the world” (philanthropic), or “building a new payment system to make people’s lives easier” (social, professional). These missions may be completely personal, or they can be aligned with your company mission. What is clear is that the happiest people at work I have ever met all had a clear mission, or at least where aligned with their company’s mission (of course, first thing’s first, and apart from having a mission you have to love what you do).

Something that we should not forget is that even when people love their job, they still need to make a living, and here is where some second order variables come to play in our discussion, such as social benefits, salary, company ethics, etc. You may be aligned with your companies objectives, but if you are doing an excellent job and offering great value to your company and not being consequently rewarded (psychologically, economically, and every other “-*ally” someone values) this can lead to frictions that reduce a person’s happiness at work. Nonetheless, individuals with a strong mission will definitely cope better with all these frictions (a fact that may be seen clearly at business owners).


Now with your permission, my dearest reader, I will take the liberty of defining happiness at work as a function of all the variables which have appeared along our above discussion in an attempt to summarize my ideas in a more mathematical and “quantifiable” way:

Happiness at work equation

Where each α represent the specific factor of preference and sensitivity of an individual to different dimensions and aspects of their jobs (some of which have been slightly presented during my discussion). Thus, the following vector defines the specific preferences and sensitivity of an individual to these dimensions:

Individual’s Sensitivity Vector

You may see that my proposed equation is divided in to two parts:

  • A base happiness factor defined by the sensitivity vector of an individual to different job dimensions. It is without doubt that a worker with a higher salary and better social benefits and a work-life balance, even if he does not have a clear mission, will most probably feel happier at his job than someone with a lower salary and worse overall benefits.

  • What I call the “mission factor” measures in what extent an individual has a clear mission at work. This factor multiplies the base happiness factor and increases the base level of work happiness. Inside the mission factor there is another variable to take into account at this level, the monotony at work. Even if two workers have no clear mission, the one with less monotony at his daily job will definitely feel happier than the other one. Monotony affects happiness negatively.

I came to this equation after working at several jobs, some observational work and a lot of thought and reflection. This is the better way I can find to “a priori”, and without deeper knowledge, identify how happy a worker can potentially be at his job. I’ve been trying to test this equation empirically for a while, so I am thinking about interviewing some of my colleagues and friends to empirically validate this equation and see how accurate it is predicting their happiness at work. Cool experiment, right? Follow me in Twitter to stay tuned and contact me if you want to be part of this fun experiment.

This discussion about “happiness at work” is something I have always been looking forward to formalizing. I would really appreciate feedback and further improvements to this discussion. Work represent a high percentage of our waking hours, let’s try to be happy in them as much as we can. If from the feedback I receive I see interest in this topic, I will transform this “fun experiment” into a more serious parallel project. See you soon!


Idea of the week #1

The Wikipedia of open source projects documentation. Like a rework of Stack Overflow but instead of having a “question and answer” approach with many outdated questions, a portal similar to Wikipedia with updated information of “as many as possible” open source projects. In short, a collaborative effort to document the sometimes “under-documented” open source universe. Contact me for further explanations about the idea.

@adlrocha - Ideas are worthless

That is why I am going to start giving them away!

photo of bulb artwork

I’ve been thinking lately about innovation and entrepreneurship, and I’ve been asking myself several questions: What makes an idea good? How do you turn a good idea into a successful business? What makes a startup or a corporation a success? What is (or was) the core idea of the most valuable companies in the world? And how can this value be sustained over the years? These simple questions are, in my opinion, not that easy to answer, but they serve as basic framework for innovation and entrepreneurship.

Focus on the “how” and the “why”, not the “what”

If you are a bit like me you most probably will always have with you a notebook to write your “next big idea” for a side-project, brand new system, or business. These ideas may seem great in their inception, and good enough to be worth your spare time. Even more, you even decide not to share your ideas with your peers, because they are so good that you don’t want them to copy you. Unfortunately, as good as these ideas may seem, you are never able make them come into fruition. What happened? Weren’t the ideas good enough? Or was the problem your lack of time, motivation, dedication and required knowledge to make them a reality? Let’s be honest a bit of both.

Look here or there, and you’ll see all the rivers of ink that have been spilled with the following headline: “Ideas Are Worthless”. After working for a while in the field of innovation, reading a good ton of books about entrepreneurship, and trying myself to make a reality a bunch of ideas, I am starting to completely agree with this claim. How many times have you heard the following sentence? “If only I would have thought of that, I'd be rich!” The most successful and sustainable businesses are rarely the result of the perfect idea, in the same way that great ideas do not always lead to great innovations (although it certainly gives you a head start). The idea is just the seed that need to be nurtured to grow a strong tree.

So if ideas are not important, what is? In my opinion, motivation and execution (the “why” and the “how”). The first thing an idea needs to become a reality is the “why”. An idea needs to excite you just by thinking about “her”. You will have to invest a lot of time, probably money, and sacrifice and risk several aspects of your life to make it a reality, so you better be fighting for something that is worth. Be specific and don’t try to convince yourself. Take the example of Bill Gates, if you had ask him in the 70s why did he drop out of school to build Microsoft he would have answered something like: “I want to put a personal computer in every home of the world to make people’s life easier”. This idea excited him enough to make him make the sacrifices he made to build Microsoft.

This “why” can be personal or transcend to something external. As long as it is exciting enough to get you going it represents a good motive. You may want to “put a PC in every home” or “recover the control of your data and your digital identity”. Both are two great examples of seeds “exciting enough” to help you build a successful business or tech disruption.

But again, the correct “why” is not enough if it is not combined with a great “how”. Having the right team, having the required skills to make your idea a reality, having the money, the contacts, access to the customers, etc. Execution is key, and you need the resources. Why do VCs invest in people more than in ideas? They know that good executors have higher probabilities of making “any idea” profitable. In short, once you have figure out your why, find your A-Team, as they will help you make sh*t happen.

Ideas are worthless, Execution is Everything. – Randy Tan ...

The Ideas behind success

So what was the idea behind the currently most successful and valuable companies in the world? And how did they got there?

  • Microsoft’s idea was simple, they wanted to “democratize the use of personal computers”. In the times of the Altair 8800 and the development of the first software programs performing useful tasks, Bill Gates wanted to put an easy to use computer in everyone’s home. The way he came up with to do it was called Windows NT.

  • AirBnB wanted to “democratize accommodation”. They took the core business idea behind hotels and “decentralized” it putting in contact hosts with visitors.

  • Uber’s goal was to “make transportation accessible to everyone in the city”. They took the taxi business and implemented it better.

  • Apple is a hard one. I wouldn’t know how to frame it in my model. What we can agree of is the outstanding execution of Steve Jobs with impressive ideas such as the iPod and the iPhone. I guess that in this case having the right idea was as relevant as its execution.

  • Amazon wanted to take libraries to the 21st century with the use of the Internet. Jeff Bezos’ took the ecommerce idea that was starting to show up in the 90s with the appearance of the Internet, and he applied it to books (a long-tail model).

  • Instagram was originally a check-in app (Burbn) that evolved to become a photo app because it filled a need in that category more effectively than existing applications

  • Google just took the idea of search engines from companies such as Yahoo or Altavista and they implemented it significantly better. A good example of how ideas are worthless and it is correct execution what wins.

  • McDonald's thrived by making tasty, cheap hamburgers. Restaurant chains weren’t something new. Old idea, better execution.

  • Dell manufactured PCs better, cheaper, and faster than rivals. Their execution aimed to get out of business companies doing the same such as HP.

And as a final touch, let’s take as an example the companies of (for me) one of the most brilliant entrepreneurs out in the wild, Elon Musk’s Tesla and SpaceX. Just take the following tweet from Elon as the perfect illustration of the importance of execution. Everyone could be excited with the far-fetched ideas of ending with fossil fuel cars and replacing them with electric autonomous vehicles; or with the idea of populating Mars. But let’s be honest, these ideas alone are worth nothing, bordering on the stupid, but in the hands of someone with the execution skills of Elon Musk things are quite different.

What was Elon’s master implementation plan to remove all fossil-fuel cars? He would build an expensive electric sport car in order to get all the money and knowledge he required to start building affordable electric cars at scale. With the money of these affordable cars, he would make them even more affordable so that he can penetrate the pockets of a great demography. The problem of all these electric cars was to have the zero emission energy sources required to feed them, but Elon also thought of the solution to this: to build through Tesla zero emission electric power generation alternatives required for his electric cars. The cool thing about this execution plan is that he is actually managing to make it a reality. Brilliant!

What about SpaceX? Musk was frustrated that NASA wasn't doing more to get people to the red planet — and concerned that a backup plan for humanity wasn't being developed (for when Earth becomes an uninhabitable wasteland). So since its inception, SpaceX have been offering private space services (to, for instance, launch satellites to orbit for a modest fee) in order to test all the technology required to get the human race to Mars. Since then, SpaceX has developed several impressive aerospace systems: Falcon 1, its first orbital rocket; Grasshopper, a small self-landing test rocket; Falcon 9, a reusable orbital-class launcher; Dragon, a spaceship for cargo and soon NASA astronauts; and Falcon Heavy, a super-heavy-lift launcher.

Elon Musk and all the aforementioned companies are good examples of how having the “how” right overcomes a great “what” and an interesting “why”.

“Don't be afraid to share your idea. The value is not in the idea, but in the execution. Experienced entrepreneurs, business owners, and investors can give you valuable advice. If your idea is any good, people will steal it. Your job is to execute better than them.”

big falcon rocket bfr spacex scale dimensions measurements

I myself have came up with several “million-dollar ideas” such as Acorns (my project was called Myra, I can share with you the deck I prepared if you are curious), or Mealime (I called it FestApp). Why did Acorns and Mealime were successful but not Myra and FestApp? Execution, execution, execution. The idea was there, I had a business model that theoretically worked, but I lacked the motivation, the time, the team… in short, the execution.

The why determines the culture

So if the “how” is so important, why caring about the “why”? Because the why will make you sustainable. The “why” determines the culture and the motivation to align the focus and direction of the team, specially when the group grows. The why is what attracts and retains talent (apart from a good paycheck at the end of the month, obviously). Let’s illustrate this using Microsoft as an example. The original goal of Microsoft was to “democratize personal computers”. This worked until the late 00s, when the company started losing their innovative culture, and losing site of the end goal. With Microsoft’s new CEO, Satya Nadella, Microsoft is starting to recover their lost culture, and this has been thanks to Mr. Nadella, who has recovered Microsoft’s “why”, aligning its people culture. This change is making Microsoft a more sustainable company than a decade ago (if you don’t trust me check the evolution of the stock since Nadella became CEO). I really recommend you read “Hit Refresh” to see the change of Microsoft with Nadella’s leadership. In the meantime I will leave you with two quotes I really loved from the book, and which perfectly depicts the point I am trying to make here.

“Culture eats strategy for breakfast.”

“I told them that we spend far too much time at work for it not to have deep meaning.”

“Hit Refresh” - Satya Nadella.

There is no such thing as the Holy Grail.

And having said all this, don’t expect this framework to be the perfect recipe for your business success (if this was the case I would be rich by now), but after some patient observation, and many reflections I started wondering myself, “how such a dumb idea has made so much money?” or “why couldn’t I have come up with such an idea?”

It is decided! I will be giving away my ideas

Ideas are worthless, and I usually have lots of them that I am not able to execute by myself (due lack of “excitement”, motivation, or someone to help me with them). I decided that as part of my newsletter I am going to start giving away a new idea every week. Initially I will give them for free, with the only condition that, whether you decide to build it with me and jump me in the project or not, you have to keep me updated of the developments and the evolution of the idea. I usually have ideas that solve needs or that tackle concerns I have, so seeing any of them come into a reality (even if I can’t benefit from it), would make me really REALLY happy. So starting next week, expect a new great (and in many cases dumb) new idea you (or we) can start working on.

BRILLIANT MEMES image memes at relatably.com

@adlrocha - S(Z)okrates is more than just a philosopher

Zero Knowledge Proofs in action.

book lot on black wooden shelf

A few months ago I introduced through “The ZKP Game” a set of cryptographic primitives that are gaining a lot of attention in the blockchain world, zero-knowledge proofs. In that publication we did a walk through the theoretical basis of these primitives, but we didn’t introduce how to use them in practice. Today I want to share with you one of the projects that helped me the most in my quest of understanding how Zero Knowledge Proofs (and in particular zkSNARKs) practically operated, Zokrates.

Disclaimer: If you have the chance, read “Letters from a Stoic” from the actual philosopher… one of my favorite books ever.

The philo(z)opher

ZoKrates is a toolbox for zkSNARKs on Ethereum. It helps you use verifiable computation in your DApp, from the specification of your program in a high level language to generating proofs of computation to verifying those proofs in Solidity.

i.e. with Zokrates we are able to easily generate zk proofs, publish them on-chain in a smart contract, and validate them on-chain. The best way to understand how Zokrates and the use of zkSNARKs in Ethereum work is to follow their “Getting Started” docs.

The easiest way to start playing with Zokrates is using their Docker image, that way you don’t have to worry about installations and dependencies. Use the following command to start interacting with Zokrates:

docker run -ti zokrates/zokrates /bin/bash 

Once inside the console, you can try to run ./zokrates to see the type of commands we have available:

compile            Compiles into flattened conditions. Produces two files: human-readable '.ztf' file for debugging and binary file
compute-witness    Calculates a witness for a given constraint system
export-verifier    Exports a verifier as Solidity smart contract
generate-proof     Calculates a proof for a given constraint system and witness.
help               Prints this message or the help of the given subcommand(s)
print-proof        Prints proof in chosen format [remix, json]
setup              Performs a trusted setup for a given constraint system

You can see how Zokrates offers all the utilities required to start playing with zkSNARKs. From compiling into flattened conditions the computations you want to include in your proof, to the generation of the proving and verification keys in the setup phase, to building proofs, and the implementation of the verification code that should be included in the Ethereum smart contract in order to perform on-chain validations of proofs.

A toy example

Let’s illustrate its operation with a simple example: imagine that you authenticate users in your new system through their password, but instead of storing directly their password in your database, the moment users set their password, you apply the following function (fn = pass · pass · 2) in order to obfuscate it before storing it. From there on, in order to authenticate to your service, users just need to proof knowledge of their password, but you don’t want to gain knowledge of their specific password, nor make them transmit it in the open. As you just read about Zokrates and zkSNARKS in your favorite newsletter, you decide to use these cryptographic primitives to implement your authentication system.

The first thing you would do is to implement your desired program using Zokrates’ DSL. Create a file called, for instance, auth.zok, and add the following piece of code:

def main(private field pass, field stored) -> (field):
  field result = if pass * pass * 2 == stored then 1 else 0 fi
  return result

This piece of code implements the computation we want to run in our proving system. Our “private” argument is a user pass, and the public information is the output of our function computation, i.e. the piece of information stored in our database. For a user to successfully authenticate we will require him to show knowledge of his password (i.e. they will have to build a valid proof using their password that would have to be validated successfully by our verifier).

Once implemented our desired computation, we need to compile the code in order to build the flattened constraints understood by our SNARKs. To do this we just run:

./zokrates compile -i auth.zok

If you recall from the theoretical overview we did of zkSNARKs in the ZKP Game, this cryptographic primitive requires of an initial setup phase to generate a proving and verifying key in order to be able to start building proofs and validating them. This stage is critical because if done wrong or in an insecure manner could lead to a malicious agent being able to generate fake proofs. I recommend this article to deeply understand zkSNARK’s setup phase. To perform the system’s setup we build:

./zokrates setup

This command should have generated two files: a “proving.key” and a “verification.key” from our computation (compiled in the “out” file). The proving key is used by users to generate new proofs, while the verification key is used in the validation process.

We are going now to compute a witness in order to test the operation of our computation. Imagine that I am a user whose password is 42 (the answer to life). We compute a correct witness as such:

./zokrates compute-witness -a 42 3528

As an output we obtain a “1” because my password equals the “supposedly” stored data in the database (the 3528). If instead of this pair of numbers we computed the witness with any other random pair of them we would get a “0” (as in “you failed the computation”).

We are going to build now the proof required by the user to authenticate in the system with:

./zokrates generate-proof 

This function uses the proving key and the computation flattened constraints to build it. If the proof is generated successfully you will see a proof.json file with the values for the proof. These are the parameters to be shown by a user in order to be successfully verified and authenticated by the system (explore the concept of Elliptic Cure Pairings to better understand the mathematical meaning of these parameters of the proof).

So we have our proof. How can we verify it? Zokrates includes the following command to export a verifier for your computation in Solidity:

./zokrates export-verifier 

This generates a file verifier.sol with the verifier Solidity code. Formally, you could translate this code to any other programming language in order to validate your desired proofs. Easy, right? With these few simple commands we’ve been able to generate our own ZKP cryptosystems, thank to our favorite philosopher. Here’s the Solidity code of the verifier function:

function verify(uint[] memory input, Proof memory proof) internal returns (uint) {                                                                                                                                                   
        uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;                                                                                                                      
        VerifyingKey memory vk = verifyingKey();                                                                                                                                                                                         
        require(input.length + 1 == vk.gamma_abc.length);                                                                                                                                                                                
        // Compute the linear combination vk_x                                                                                                                                                                                           
        Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);                                                                                                                                                                             
        for (uint i = 0; i < input.length; i++) {                                                                                                                                                                                        
            require(input[i] < snark_scalar_field);                                                                                                                                                                                      
            vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.gamma_abc[i + 1], input[i]));                                                                                                                                            
        }                                                                                                                                                                                                                                
        vk_x = Pairing.addition(vk_x, vk.gamma_abc[0]);                                                                                                                                                                                  
        if(!Pairing.pairingProd4(                                                                                                                                                                                                        
             proof.a, proof.b,                                                                                                                                                                                                           
             Pairing.negate(vk_x), vk.gamma,
             Pairing.negate(proof.c), vk.delta,
             Pairing.negate(vk.a), vk.b)) return 1;
        return 0;
    }

An attempt to extend Zokrates: Gokrates

It was a while since I last used Zokrates before this publication, and since them it has evolved a lot including more proving schemes, more available primitives for the computations, etc. One of the things I tried with Zokrates was to try and build a tool to export the verifier in Golang (instead of just in Solidity) so that I could validate proofs inside Hyperledger Fabric smart contracts. I called the project Gokrates. Due to a extreme lack of time, and the appearance of other priorities, I didn’t manage to fully finish the project, but it really helped me understand the maths behind zkSNARK. I may take back this project one day, in the meantime, if someone has the time to contribute and help me extend Gokrates, feel free to do so.

More complex examples

Using Zokrates DSL you can build more complex examples than the one I shared in this publication. Have a look at this example of “Proving knowledge of a hash preimage” if you want to build the next ZCash implemented in Solidity. Start exploring Zokrates and its standard library, and start having fun building zero knowledge proofs in your DApps. It has never been this easy to start using these complex cryptographic primitives. Kudos to the development team behind this project.

@adlrocha - Dissecting Tech Conferences

Submitting a talk v.s. attending to one.

person discussing while standing in front of a large screen in front of people inside dim-lighted room

This past week my talk “WASM: A Universal Bytecode” was accepted to the T3chFest2020. A few months ago, I was also honored to receive an invitation to talk at the Hyperledger Global Summit about “Going into Production! Performance Best Practices in Hyperledger Fabric”. These two invitations are huge for me. I am super happy and humbled to have the chance to share my knowledge in front of so many experts in the industry. Nonetheless, after going through the Call4Talks process, and receiving these invitations, some questions started wandering my mind: What is the point of these tech conferences? Why so many professionals in the industry are so eager to talk at these events? What makes a talk suitable for such events? And finally, what is in for attendees, speakers, organizers and sponsors? Let me share with you my own experience in this matter.

Should I submit a talk?

So you’ve come across a renowned event in your field which is accepting Call4Talks (C4T) and, for years, you have been looking to speak at one of these. The first two questions you have to ask yourself before submitting a talk are “what topic am I looking to talk about” and “what are my goals for speaking at the event”. This will largely determine your success in being accepted as a speaker.

Lets take my case as an example: one of my new year’s resolution from last year was to be accepted as an expert speaker at a high impact tech conference. I submitted several talks to different tech events, but I was always rejected. The reason for this? I usually selected a “random topic” I felt I knew enough about and could be interesting for the audience and the organizers. My goal for the talk? Plain and simple, “to be a speaker at the event”. I was submitting talks for the wrong reasons, thus, my proposals lacked real value for the community of experts.

What changed from these first talk submissions, and my recently accepted ones? They have a clear goal. I am looking to have a specific impact in the audience, not just give an inconsequential talk. Let’s take my HF Global Summit talk for example. A lot of companies have been exploring blockchain technology and have deployed Hyperledger Fabric-based proof-of-concepts in the past few years. Usually, these exploration PoCs work fine and are useful to show our C-Level grown ups at our corporation the benefits of using blockchain technology. The problem comes when you try to move these PoCs into production, as the current performance of Hyperledger Fabric (and, in general, all blockchain platforms) are unable to accommodate the high load of users expected to have at a production system. This is a problem my team and I have been facing for a year now, and it seems like no one in the field is being really open on the problems of moving a blockchain-based (and specifically a Hyperledger Fabric-based) systems into production. So with this talk, my goal is to set a groundwork of Hyperledger Fabric-based systems performance evaluation and a common framework so that other big players in the industry can start exploring this problem and sharing their achievements with the community (as we are doing). My goal was clear, right?

The case of my talk “WASM: A Universal Bytecode” is a bit less ambitious but it still had a clear goal in mind (and those of you who have been following this newsletter for a while have already a quick glimpse of what is my opinion about WASM). The development of Web Assembly has been outstanding in the past years, and the fact that we can have a de-facto target bytecode compilation equally interpretable by several systems, regardless of the source high-level programming language used, opens the door to new opportunities and use cases from which I want to draw the attention to my peers. I feel like WASM could change, not only how we run smart contracts in blockchain networks, but also how we design web applications and operating systems.

Of course there are still smoke experts able to push their low-quality talks to some high-impact events for the sake of self-promotion, but usually these talks don’t have much of a run, and the audience sense the lack of enthusiasm and motive behind the talk. So my personal advice would be for you to escape from these “smokey experts modus operandi”, and forget about self-promotion for the sake of self-promotion. You will strengthen way more your personal brand if your talk is about a subject of interest. If this is not the case, don’t worry and target the next big conference (this is something I learned from my times in research: don’t get stressed if you don’t reach this conference’s call for papers, you can always have it ready for the next one). Patience is a virtue, my friend (take this from someone who really lacks patience).

EXPERT MEMES image memes at relatably.com

What makes a talk “good enough” to be accepted?

Of course, when you are submitting a talk to a conference you need to clearly understand what kind of conference you are targeting: the specific topics of the conference, the tracks, the organizers and sponsors, the expected background of the audience, etc. This will really help you design your talk. Bear in mind that you only have an abstract of a few hundred words to convince the organizers that your talk is worth being part of the program. You have to make the organizers really want you there. Some advice I can give you about this with my limited experience:

  • State clearly the context of your talk to the organizers. Make them feel the problem addressed in the talk as theirs, and make them really want you to attend their event (you are the solution to their problem).

  • Describe briefly what will be the structure of your talk, and the outline of topics to be presented.

  • And as you may have realized already, what for me is one of the key points in order for a talk to be accepted, the aim of the talk. The same way you would state the main contribution in a research paper, you have to state how is your talk going to benefit the audience, help the tech community, etc. In short, what value your talk brings to the event.

Related to this, for me a good way to get inspired while I write the abstract of a C4T is to read research papers abstracts. Obviously is not exactly the same, but research paper abstracts have the basic structure a C4T abstract should have to have a good chance of being accepted.

How to Spot Research Spin: The Case of the Not-So-Simple ...

It is worth speaking at tech conferences?

If you have a clear goal for your talk in the event then definitely! It may be because your are looking to share a new way of doing things that have worked for you, because you want to introduce a new discussion in the industry, because you want to share a specific piece of knowledge, or because you want to present your latest research/product to the community. In any of these cases, I feel it is something every “expert” in our industry should at least experience once.

You have to bear in mind that preparing a high-quality talk for a conference is a lot of work, and it must to be supported by a lot of prior efforts. Nonetheless, you will learn a lot in the process: about public speaking, about your own topic, about how to share your ideas efficiently to an audience, etc. And after all this work is done, the interesting (and usually uncomfortable) questions you may get after the talk, and the deep conversations and networking you may trigger with your peers, are totally worth your talk. Do not focus your talk solely on strengthening your personal brand and sharing “what an expert you are in a topic”. Benefit instead from the conversations and questions your talk may arise as they can be a source of innovation and collaboration. As my boss and a good friend of him use to say, “innovation appears at random conversations with people from different backgrounds and fields of expertise”, and I totally agree with this statement. So take the most out of your conference talk (not only from the talk in itself).

And attending to one?

To be completely honest, I am not a big fan of tech conferences myself. I usually get bored at them. It depends on the conference, of course, but I usually end up going to a few talks of interest to me and leave. This is because I am more into learning things in books than in talks, but this doesn’t mean that you can’t get a lot of value from attending tech conferences. From a general point of view it is worth attending a tech conference for these two simple reasons:

  • Learning: You can learn a lot from the experts speaking at a tech conference, specially when they address topics relevant to you professionally. Learning how other’s approach certain problems could help you “see the light”. However, be also prepare to attend talks that promise to solve all your problems in their abstract and they end up being shallow talks which tiptoe around the important issues (it may be a good idea to collaboratively write “The Definite Guide To Attending Tech Conferences” to avoid these issues. Patent pending).

  • Networking: For me the crown jewel of tech conferences. Talks at tech conferences are just an excuse to gather experts in the field and trigger discussions between them. The talks are just way of setting up the context for deep and interesting conversations (as already mentioned above). That is why I feel is so interesting to set the aim and goals of your talk, to help your peers steer their questions and conversations with you. I insist, a lot of good innovations and collaborations are born from these “nerdy” gatherings.

Microsoft implementa un nuevo programa para ...

What are the benefits for your company?

Companies can benefit from tech conferences at several dimensions:

  • You can encourage your employees to talk at expert conferences thus showing their knowledge in the field and demonstrating the company’s expertise in the technology. Apart from my personal achievement, my company will also benefit from me going to the Hyperledger Global Summit, as it shows how Telefónica is actually doing real stuff with blockchain and Hyperledger Fabric, and how we are at the forefront of blockchain-based systems in production at corporate environments.

  • Companies can also organize and sponsor tech conferences in other to attract experts from all over the world to talk about an interesting matter for the company. It is a way of gathering world renowned experts on their premises so their employees can “suck all the knowledge they can” from these experts. These conferences are also a good way of PR.

The same way speakers should have a clear goal with their talks, I feel organizers and sponsors at tech conferences should have a clear view of what they are trying to get out of the events. Sponsoring for the sake of sponsoring, or organizing for the sake of organizing may be a fundamental error.

Do not disregard other tech event formats

Today we have dissected a bit more tech conferences, but it would be interesting to perform this same exercise with other format of events in the industry such as hackathons, workshops, think tanks, etc. They all have their drawbacks and benefits, and as they are becoming increasingly popular, it may be something worth discussing.

Disclaimer: All the opinions in this publications are inferences resulting from my limited experience at tech conference. In order to give a broader view about the matter, I would love to have your opinion about this. Share it with me in the comments section or through social media, and I’ll make sure to update this post with your contributions. People should know what to expect from tech conferences before committing their valuable time to them. I would really appreciate if your could help me on this.

Loading more posts…