First steps towards Blockchain development

I’m probably late already to the game, but nonetheless I do want to understand the technology behind Blockchain better, and so I picked Ethereum for my studies as it provides you with tools to build programs that run on top of the blockchain.

My goal is to be able to apply the acquired knowledge to future projects.

I’m taking this awesome course on Udemy called “Ethereum Blockchain Developer: Build Projects Using Solidity”.

What I’ve learned so far:

  • How to create your own local Ethereum network.
  • How I mined my first Ethers. (Kind of feeling rich, except I’m not haha as they’re worth nothing)
  • How to write, test, deploy smart contracts and how to interact with them.
  • How to interact with the Blockchain in the console
  • How to use TestRPC to write smart contracts.
  • Understanding how Ethereum and Blockchain works underneath.

What I still need to learn:

All-in-all a very practical course – I already recommended it to my buddy Cesar Rodas, who also seems to have liked it.

Achievement unlocked: Meeting Robert Kiyosaki in person

On September 9 I met Robert Kiyosaki, his wife Kim and his advisors in person. He’s currently touring in South America with his advisors, and my wife and I could talk for about 5 minutes to him in person (unreal!). Robert is one of my most important mentors, and such a humble person.

Robert Kiyosaki in Paraguay

Robert Kiyosaki in Paraguay

Book review: “Zero to One” by Peter Thiel

My main take-away from the book “Zero to One” by Peter Thiel, co-founder of PayPal and Palantir, is that in order to build a successful startup you need to innovate, which means building upon new ideas instead of copying existing ones, as only when you innovate you will be able to create companies like Tesla, AirBnb, Uber, etc.

Book cover 0 to 1

What makes this book so good is that you can probably finish this in under 4 hours, which makes it a short read, but a very captivating one.

I consider this the most important book for any entrepreneur as of right now.

Below are my notes and reviews for each chapter, but I highly recommend reading the book.

Chapter 1: The Challenge Of The Future

There are two types of ideas:

  • Vertical ideas: which is building new things that might not work.
  • Horizontal ideas: which is copying existing things that already work.

The single word for vertical ideas is: technology. Like the invention of the wheel, or the blockchain.

The single word for horizontal ideas is: globalization — which means making vertical ideas work everywhere.

Spreading old ideas to create wealth will result in devastation, not riches.

In a world of scarce resources, globalization without new technology is unsustainable.

A vertical idea is all about creating new technology, creating something from nothing and create value for others, taking it to 1.

Chapter 2: Party like it’s 1999

In this chapter Peter writes about the Dot.com bubble, and the thinking that led to the bubble.

Peter invites us to always question the logic of the masses, as before the bubble it was considered normal that a business was not profitable but went out to collect money from investors.

The first step to thinking clearly is to question what we think we know about the past.

Chapter 3: All Happy Companies are Different

A successful company is a monopoly. See Google (its search engine easily takes up 80% of the global search volume).

Each successful company solves a unique problem, and all failed companies are the same: they failed to escape competition.

Chapter 4: The Ideology of Competition

Rivalry causes us to overemphasize old opportunities and slavishly copy what has worked in the past.

Most of the times if you can’t outperform a rival, it’s better to buy your competitor, or gain an innovative edge. There’s no good ending in copying your competition.

If you can recognize competition as a destructive force instead of a sign of value, you’re already more sane than most.

Chapter 5: Last Mover Advantage

Simply stated, the value of a business today is the sum of all the money it will make in the future.

Where two are fighting, the third wins.

Technology companies follow the opposite trajectory. They often lose money for the first few years: it takes time to build valuable things, and that means delayed revenue. Most of a tech company’s value will come at least 10 to 15 years in the future.

Characteristics of a Monopoly:

  • Proprietary Technology that’s 10x better than the competition (Google’s search algorithm and ad platform)
  • Network effects (starting small to snowball into something huge… Facebook)
  • Economies of scale (there’s no inherent reason a company like Twitter or Facebook should ever stop growing)
  • Branding (Think of Apple… having a license to use the Apple branding, is like printing money)

The perfect target market for a startup is a small group of particular people concentrated together and served by few or no competitors

Chapter 6: You are not a Lottery Ticket

Success is not a product of random luck, it’s the product of planning.

A business with a good definite plan will always be underrated in a world where people see the future as random.

A startup is the largest endeavor over which you can have definite mastery. You can have agency not just over your own life, but over a small and important part of the world. It begins by rejecting the unjust tyranny of Chance. You are not a lottery ticket.

Chapter 7: Follow the Money

The power of law; and the Pareto principle (80/20).

In the portfolio of venture capital firms usually less than 10% of the startups vastly outperform the other 90% by a huge margin.

Chapter 8: Secrets

Chapter 9: Foundations

Chapter 10: The Mechanics of the Mafia

On the inside, every individual should be sharply distinguished by her work.

Build a cult, one that looks crazy to outsiders. That’s where you’ll get the best out of your employees.

The PayPal founders were originally called a mafia because everyone of the founders went ahead and built their own multi-billion companies, which was possible to the dedication and love they’ve built for the team, and the problem they were solving. Be a mafia.

Chapter 11: If you build it, will they come?

As a tech guy (like myself) one tends to underrate the function of a sales team in a company, especially in Silicon Valley. Different audiences need different approaches. You may not need a sales team to sell your low-priced product, but if your product is target at governments/enterprise/small companies you better get ready to spend some serious cash on closing the deals with dedicated sales reps to close big cash deals.

In addition to selling to customers you need to sell your company to employees and investors, which in return attracts more people.

If you don’t have a sales team, then you are the salesman, just like people want to talk to the CEO when you want to close a $100.000 or multi-million dollar deal/contract.

Chapter 12: Man and machine

Software is eating the world. More and more jobs will be automated by computers, but the biggest challenge for today’s entrepreneurs will be to figure out how to empower people in the future.

Machines are meant to be complementary for people, not a substitution.

Globalization inevitably means substitution because that’s what we see is happening; people from India replace higher-paid workers in countries like the US, and that’s going to be more common not less.

PayPal had tried to prevent fraudulent transactions with algorithms only, but fraudsters would quickly change their patterns and the algorithms would stop working. So they went for a hybrid approach. They complemented the approach with a human, and thus gained themselves a huge competitive edge in processing payments faster than even banks.

You need to let humans do what they’re good and let machines do what they’re good at. The perfect symbiosis.

Chapter 13: Seeing green

Due to rising concerns in the environment there were many incentives to start companies that would help to improve the environment, but instead of achieving that most companies went bankrupt because they neglected one ore more of the seven questions that every business owner answer:

  1. Can you create breakthrough technology instead of incremental improvements? Is your technology 10x better than any solution out there right now?
  2. Is now the right time to start your particular business? Are the right conditions given? 
  3. Are you starting with a big share of a small market? Does your market exist, or is it so big that competitors will crush you?
  4. Do you have the right team? Never invest in a tech CEO that looks like a salesman.
  5. Can you not only create but deliver your product? Tesla first went out to build a sports car, so they would know how to build a factory that could produce a car for everyone. Scale accordingly.
  6. Will there be a market in 10 to 20 years from now for your product? Electric cars vs gasoline cars.
  7. Do you see a unique opportunity that others don’t see? Do you have the secret sauce?

Tesla is one of those companies which got all 7 right.

Chapter 14: The Founder’s Paradox

Embrace the fact that you’re different.

The PayPal team in 1999
The PayPal team in 1999

The founders can signify the difference between the failure or success of a company. See Steve Jobs.

Why Evernote is part of my life

I wrote a post about Evernote (Why Evernote sucks) back in 2012 where I wasn’t very happy about it. Fast-forward 5 years later, my life heavily depends on Evernote, and I’m a happy user. Here’s why:

  • Life-goal tracking. I review my 25-year vision every day on my Mac, and update my daily, weekly, monthly and yearly goals on a daily basis.

    My Evernote shortcuts
    My Evernote shortcuts
  • Scanning documents. I digitalize most of my documents… and when I scan business cards it automatically adds the person to my contact list on my smartphone. Convenient and awesome.
  • Taking notes. Evernote is still my preferred way to store thoughts about ideas, meetings, projects and things I read on the internet.
  • Evernote Web ClipperThis is how I bookmark and archive interesting reads on the internet, so I can later find them when I want to remember something I read in the past, which brings me to…
  • The search function. This has to be by far the biggest differential. It’s all nice and good to be able to store your notes, documents and articles in an application, but finding it is key. Evernote’s search features OCR so I can search for text in PDFs I stored a few years ago, and it brings those results up in a matter of milliseconds. No memory can beat that. I can’t recall how many hours this feature saved me.
  • Skitch. The useful little helper that allows me to annotate screenshots and images, to later find them again.

Convinced? Try Evernote clicking here.

Open-source alternatives aren’t there yet.

In order for me to use any alternative, they’d need to have that awesome search Evernote has. Believe me, I tried every alternative, and I would pay for them if they’d be able to solve the search problem first with a decent OCR implementation.

Commercial solutions alternatives aren’t there yet.

Apple’s Notes app might come in close, but the search is not near as good.

All-in-all I love using Evernote, but the only reason I’m a Premium user is for using the Evernote app on my smartphone. There surely is an opportunity for a good app which focuses on personal power users to get some of that market share…

November 27

Today I started taking a course about ReactJS on Udemy. I am serious
about it, because ReactJS presents a new way to write better and faster web
applications.

I also purchased a course about React Native, which is also very
intrigueing because it promises unified and native app development for
Android and iOS with JavaScript only.

I can’t wait to report on both of them.

Oculus Rift app ideas for 2020 or earlier

  1. Bycle riding gamification

    Riding a bicycle is boring. Riding down pretty much the same old ways to work every day?
    What about chasing objectives while you’re riding with your Oculus Rift turning
    routine into a new adventure every day?

    Combine this together with a fitness tracker to automatically adjust distance
    to work depending on your current fitness level.

    A mashup of Google light radar system + Oculus Rift. Pure awesomeness.

  2. Running on steroids

    The Oculus Rift could also make running essentially so much more interesting, as bicycle riding.

    Are you tried of those same walks in the park every day, and need a little extra motivation? No problem!
    Imagine escaping a fire behind you, and the only way to escape it before it burns you to death is, you guessed it, to run…

    Again, this would imply using an additional device for mapping your surroundings, which bring me back to Google’s light radar.

  3. Deep-ocean diving in your backyard

    Do you own a swimming pool? Congratulations, you are now allowed to join our experimental, naval elite team for deep-diving missions.

    Don’t forget to charge your oxygen bottles though…

If you could build anything want to make life more interesting with technology, what would it be?

Debugging delayed_job jobs from within the console

Did you ever want to step in with the Ruby debugger to fix or inspect
a background job? Here’s how:

DISCLAIMER: Tested with delayed_job 2.14. Should work with recent
versions, too.

Open a rails console within your project

$ rails c
Loading development environment (Rails 3.2.13)

Initialise a delayed_job worker, and make it output to console by
passing {quiet: false} to its initialiser.

1.9.2p325 :001 > worker = Delayed::Worker.new({quiet: false})
 => #

Start the worker

1.9.2p325 :002 > worker.start

Now you can put a debugger statement into your jobs and debug nicely
without using loggers.

Where am I now?

It has been two year since my Google Code-In participation in 2010, and today the 2012 grand-prize winners were announced.

That event help me as a milestone my life. I look back to it, to remember what I achieved when I hardly had any programming skills.

What happened in 2 years professionally?

  • I am proficient now in Ruby and JavaScript, and learned a dozen different programming languages.
  • I worked with start-ups, companies and awesome clients, gathering the important social skills I hadn’t had before, and getting to know the frustrations working with bad clients, freaky time-schedules and bad pay, so-called “experience”.
  • Launched various projects.
  • Continuous contributions to Open-Source.
  • I write better code, but it still sucks, just less than before.

Still I feel mediocre. I feel like I could have contributed more, learned more languages, met more cultures, played less games, studied more for college, done more ambitious projects.

Though, I firmly believe, fighting mediocrity has been the most important challenge I have picked up ever since I know that I am just as any other guy, and that I am fully motivated to kick ass.

Byte for Byte.

Show latest commit ID in Rails

I find it useful to display the current git commit ID of my application:

In your application’s Gemfile add the grit gem, which is a Ruby wrapper for git, and run Bundler.

If you deploy your web application via Capistrano and git, then you can put the following in your app/helpers/application_helper.rb:

[gist id=3679774]

Make sure the repo you are deploying to is non-bare. If you are not sure about that, in the project’s directory run:

[gist id=”3679892”]

If you see a SHA-1 Hash, life is good.

Now in your template you can add the helper anywhere you like – most people prefer to put that info in the footer:

[gist id=”3679825”]

How easy was that!

Sencha Touch 2 JSONP response with Ruby on Rails

I had a hard time how to make JSONP response data render in a Sencha Touch 2 list view, but I made it. WOOT.

Maybe, truth to be spoken, I had a harder time figuring out how JSONP actually worked. I had to understand that I had to wrap the JSON object into a JavaScript callback function and change the content type of the response to “text/javascript”. ( I still don’t get it. ;) )

So, here’s the code:

The last line of the the index method will be clear when you understand read the query string parameters which Sencha sends to the server:

and, ultimately the Sencha Store object:

I wonder if you can write a more elegant method?