Dear YouTube

Dear YouTube,

You have done so much to enable creators to make and share exciting videos, whether that be mini series, cooking shows, films, music videos, news, podcasts, top 10s, documentaries, you name it.

Many communities have spawned around channels and topics, with comment sections ranging from support, to fully-blown drama. And whilst there is quite a lot of trolling, the positive and supportive comments far outweigh the negativity.

However, many of us viewers are frustrated. Those of us who spend hours watching content (and ads) have been receiving videos with worse content during the past year, more clickbait, less meat, more in-video ads, and fillers due to the 10 minute mark for mid-roll ads.

Additionally, too many creators are making videos complaining about YouTube’s policies and demonetisation, even on channels that didn’t use to post regularly about that (e.g. PewDiePie, h3h3Casey Neistat, Philip DeFranco, MrBeast, Jörg Sprave, and a myriad of other creators). A quick search for “demonetized” on YouTube returns around 369,000 videos. That’s a lot of angry creators.

This means that these YouTubers are derailing from creating the content they are known and loved for, and instead they resort to making videos talking about the platform’s problems that are directly affecting them, and in turn this means we, as viewers, receive less of the content we actually want to watch.

The way we see it is that there are three groups of problems currently plaguing the platform: monetisation, content rules/flagging, and UX issues.

1. Problems regarding monetisation:

After demonetisation was introduced over a year ago, a lot of creators were concerned, and after the first few high-profile cases started coming in, users and news outlets started calling it the “Adpocalypse“.

One solution that is increasingly being used by creators is to use Patreon, and in some cases that works really well, for example: musicians, artists, writers, cartoonists, animators, etc. But it is still an extra action (and account) a viewer has to make on a 3rd party website, which means a lot of potential contributors will be alienated. This would be solved with channel-based subscriptions similar to Twitch. We know you are experimenting with (and currently rolling out) a paid subscription system for channels, which is a good solution on paper, but in our opinion this is not the best solution.

An option to consider instead might be to establish a pot for monthly payouts. For example, a user might decide to contribute $5, $10, or $20 per month, with a similar model to Spotify or Netflix. The amount then gets divided at the end of the month between YouTubers with a percentage-per-creator calculated by an algorithm based on subscriptions, likes/dislikes, time viewed per channel, amongst other parameters.

In return, viewers are rewarded with fewer ads depending on how much they contribute per month. Google naturally takes a cut from these proceeds.

Furthermore, this can work without disrupting the business model of YouTube Red (now apparently called YouTube Premium). If we contribute $25 or more per month, why not offer the option to subscribe to YouTube Premium, but instead of keeping the $10, your revenue would depend on viewing habits, keeping $5-10 a month depending on the amount of time viewing regular YouTube, versus YouTubePremium exclusives.

2. Problems regarding content rules and bots:

One of the issues here has been communication in the past regarding changes. Recently Susan Wojcicki has stated you will be making changes in 2018 regarding how you communicate with creators. However, the wording seems to favour giving a “heads up” instead of proactively holding discussion of changes that will create major repercussions for creators.

However, that is only one part of the problem. One common complaint is that content decisions regarding monetisation, and the automatic “category / subcategory” the video falls under is not transparent enough. Some people even figured out how to enumerate the category IDs for sensitive content. Interestingly enough, that document also dives into the case of systematically suppressing demonetised videos from “suggested videos”. By making this information visible to creators, they will be able to make decisions that will influence the direction in which they wish to take their channel.

Rules also have to be made explicit, and reasons for flagging, or why videos were categorised in a certain way should be easily viewable in the Creator Studio, along with any additional information that could help the creator understand where he went wrong and how to improve / fix it. Timestamps of infringing content (the same as those applied to copyrighted content) are also a big plus.

Dude Perfect and PewDiePie’s subscribers have also mentioned a couple of instances where X-rated ads were shown on some of his videos, as their videos were placed in categories meant for mature audiences, whereas clearly their viewers have a wide age range.

3. UX and notification issues:

Videos we have viewed before (or almost finished watching and then switched to another video) constantly reappear in the suggestions. These should be excluded by the suggestions filter as few people would want to watch the same video twice (music videos being an exception). And please, do not rework the chronological subscription feed, fix it instead.

The bell / subscribe system is broken and has been mentioned by both viewers and creators. You have denied this vehemently in the past. However, recently a video on one of your own channels you mentioned the issue happened to you and mentioned this would be escalated. In this specific issue it might just have been an MQ (message queue) issue with sending out announcements (or your email service provider experienced downtime).

A mitigation strategy here would be to implement better monitoring of users that requested notifications VS users that received notifications and emails. Most push notification services, as well as email services provide receipts of reception, and also give statistics on the percentage of emails marked as spam. You should graph this (using DataDog for example) and make it visible on a monitor at all times in the HQ; this will allow you to see the actual problem, and formulate strategies to improve notifications.

As a UX bonus, if a creator uploads something new and a user is currently on YouTube, display a toast message mentioning “{CREATOR} just uploaded a new video titled {TITLE}”, you can do this easily with WebSockets or a service such as Pubnub or Pusher. The whole feature would probably only be 20-30 story points (excluding mobile).

What have been the consequences on the current policies and problems?

Jörg Sprave started The YouTubers Union movement recently, where he has 15K+ followers on his Facebook Group. He plans to take direct action such as strikes, and communicate constantly with you to try to convince you to make changes that will improve the lives of content creators.

PewDiePie has been talking about the issues for more than a year, to the point he changed his entire delivery style accordingly. Casey Neistat interviewed YouTube’s head of business (which was a great start, as mentioned in the comments of the video), however, much is left to be done.

As viewers, we don’t really want to meddle with the politics of what is happening at YouTube, nor with the frustrations of the creators. Instead, we want quality content. Many of us don’t watch Netflix, Hulu, Amazon Prime; instead, we rely on Youtube for our daily dose of entertainment. But something is really wrong when a lot of the content we watch includes long segments with complaints or rants about demonetisation, and the other issues mentioned in this article.

Our proposal:

We know the issue of figuring out a compromise between ads, paid subscriptions, and YouTube Premium is a complicated one, potentially involving everyone from your legal team, accounting, engineering, product, designers, and project manager.

An intermediary step may be: While you figure out subscriptions (and please make it easy to pay), then you should at least cover part of the salary of the creators that get millions of views, but are heavily demonetised, maybe based on the amount of views and likes per video.

Afterwards, we would like to offer a few strategies on how to develop and implement the changes. We’ve written these down in the following section.

We would also like to re-iterate the demands posted on Jörg Sprave’s union website, which we have split per section. These give a good idea on some of the major complaints the community of creators has:

  • Monetisation:
    • Monetise everyone: Bring back monetisation for smaller channels
    • Disable the (auto-flagging/demonetising) bots. Add a voting system aided by AI (see Valve’s VACnet)
    • Pay for the views
    • Stop demonetisation as a whole
    • Pay according to delivered value
  • Content / Rules:
    • Transparent content decisions
    • Equal treatment for all partners
    • Clarify the rules

You can read the extended version of the union’s demands on their website.

How can you implement this?

Set up three fireteams, one dedicated to the monetisation issues, each one dedicated to one of the topics mentioned above.

These teams should be nimble and be able to act with few constraints and red tape. I’d suggest the following structure:

  • Each team has 1 senior backend engineer, 1 medior frontend developer, 1 senior frontend developer, 1 QA engineer, and 1 team leader who is also experienced with the code base and can help with code reviews and basic project management. Some teams might require additional backend developers depending on the complexity of the issue.
  • Each team should start the project with a kick-off, determining all milestones from the start. One strategy might be to hold a 1-day meeting with several senior product managers, designers, backend engineers and infrastructure/devops, a compartmentalised list should be brought and each topic should be discussed, either accepted or rejected, and difficulty determined via planning poker.
  • 1 additional project manager who oversees all 3 teams, reports status directly to Susan, and attends daily stand-ups for all 3 teams.
  • 1-2 Infrastructure/devops engineers ensure that CI/CD are setup, test/production clusters are ready, and can immediately help with any needs (subdomains, socket.io, anything that needs to be deployed) during the whole part of the process.

This approach, with a positive attitude towards change, and a healthy dose of open-mindedness, may ultimately not only save YouTube whilst feeding content creators, but it may also establish a forward-thinking platform which could outlive us all.

Signed,
The viewers.

PS. Big props to Dear Github for the inspiration for the style and wording of this post.

PPS. You have our permission to re-upload and modify this post as you see fit.

This post has been reposted on Github where you can make amends via a PR.

Truncated Dreams

On the 9th of April 2014, I closed my business, packed my bags, and flew to Belgium, after struggling with my startup for roughly 2 years. This is a story about shortcomings, failures, and personal mistakes I made during those years.

There are plenty of articles about failed startups, describing postmortems in detail, so with this story I aim to take a more personal side, describing my feelings and thoughts during the time, and how I’ve learned to deal with failure.

My hope is that it will give you a perspective of one of the ways things can go if you start a company with no prior experience, with the intention that it could help prevent similar mistakes.

It’s a long read, but I hope you enjoy it!


 Preface

I am a 30-something year old software developer, an AI enthusiast, and a musician in my spare time. I have been programming since I was 10 years old. I started because I dreamt of making games, but sooner rather than later I ended up writing corporate software (admin and invoicing systems, ERPs, CRMs, etc.) and designing/developing websites as this was far more profitable, and easier to get into. From age 12 onward, whenever someone asked me what I wanted to do when I was older, I would always say “I’m going to be a programmer”. And a programmer is what I became.

My other dream was to own a business. When I was 13, I started my own company making simple games (and later on websites) with my best friend. Shortly after we had an amicable split due to creative differences, so I started freelancing in my spare time over the next couple of years – mostly small web design or graphic design gigs.

It wasn’t until I was 17 that I got my first real job, working for a factory developing their administration system. After a few years I realised I could maybe rewrite it, and start selling it; heck, maybe even run my own company again.

I didn’t realise bootstrapping an IT business is a nightmare, full of ups and downs.

Some people are lucky, some people are not, some people turn a side project into a million-dollar business, and others fade away unnoticed. Regardless, in most cases it will be a long bumpy ride.

This is the story of the crazy ride through my two-year startup endeavor.

Chapter 1: A lifelong dream

It all started while I was studying an MSc in Artificial Intelligence at the University of Edinburgh in 2010.

I started planning my business and the product range over a year before returning to Mexico. My friends kept asking: “Why would you start this in Mexico? Why not open a company over there? You’ll make much more money!” But my reply was always the same: “The majority of Mexico’s GDP comes from SMBs, and technology is being adopted at an incredible pace right now. With so many new companies bubbling up, there is a growing demand for cheaper SAAS ERP/MRP/CRM solutions, websites, e-commerce sites, and other IT solutions“.

Technically speaking, my response was correct, but I hadn’t factored in an important obstacle: Micro and small businesses in Mexico are used to paying low prices for IT solutions. The market is not used to paying competitive prices for professional software programs, software consulting, or full-time development work (although this is changing in 2018+). Hence why a lot of websites and web systems in Mexico still look like from the 90s. I’ve seen too many half-baked ERP solutions riddled with bugs, even in medium-sized companies. Companies just don’t want to swallow the bullet and cough up what’s required for a professional job.

This also explains why quite a few of my developer friends in Mexico have moved to Redmond, San Fransisco, and Seattle in search for better-paid positions.

July 2012

I returned to Mexico on the 4th of July, 2012. Less than 3 months later I had three small clients looking for an administration system (including the factory I had worked for years ago).

After a few meetings with them I figured out my best bet was to rewrite my previous system, start a business, and work exclusively on it, while trying to find new potential customers. I also decided to treat it as a SAAS product, as it would facilitate deployment for the 3 customers.

A month later I started the process of relocating to a small office (instead of working at home). This was my first mistake. I didn’t need an office, I just wanted one. I contacted a couple of friends (who had their own startups), and decided to rent an office with them and split the rent. We had a bright, modern office space in the south of Monterrey. The future looked promising. I was earning a good amount of money, paying my bills on time, and acquiring computers, whiteboards, stationary (man, I love stationary!), and other office assets.

I dreamt of a beautifully decorated place, with a pool table and a large screen TV. I dreamt of people hacking around on Arduinos and Raspberry PIs in their spare time. I dreamt of small teams collaborating in great ways. I dreamt of a place that would be fun, engaging, inspiring and challenging.

computers

Instead, the workload started building up. I started making regular trips to Mexico City and Guadalajara, and I didn’t have enough time to finish the project in time, heck, I didn’t even have a full spec. Requirements kept pouring in, so I decided to hire a couple of people: a developer and a graphic designer. First I found a designer, recently graduated, willing to take a lower pay in exchange for real-world practice. I then published an ad in the newspaper, on university sites, and on LinkedIn, and a few weeks later I made my first development hire. We started out as a motivated team, we had goals (albeit short-term), and we believed in each other.

We were earning a decent amount of money developing our administration system, so we started taking up other work like designing custom websites and tools. I didn’t think about offering stock to my first employees, nor did I look for investors. I didn’t want to give up any part of the company, as I blindly thought that I could lead it by myself. This was my second mistake. Don’t be selfish, working with partners can be difficult sometimes, but bright minds (and a bit more money) go a long way. It’s all about choosing the right partners, and incentivising your first employees by offering at least a small percentage of the company, specially when you don’t have any initial investment.

December 2012

By the end of the year, I was nowhere near finished with our administration system, and on top of that we had taken up another major project (an ERP system for an entirely different business sector). Our first 3 clients were getting annoyed, we were making progress but not as fast as we could have worked. Did I need a designer for a product we didn’t have enough time to develop? I should have doubled down on development and left design til the end.

We started falling further behind schedule, money wasn’t coming in as fast because we hadn’t finished what we promised, and our newly-finished side project (a file-based CMS system) wasn’t selling. I couldn’t hire salespeople as I barely had enough money to pay my employees. We started rushing around, trying to finish our previous commitments, but it was too late, the damage was done.

I’m not saying it is bad to think big, and to be optimistic about the future. I think the biggest lesson I learned during this period is that you must always focus on your priorities, and only develop those non-paying risky ideas in your spare time. We shouldn’t have taken on web design work, nor embark on a side project to build a better/faster CMS, and we definitely should not have signed up to develop another ERP, regardless of the money.

If we had concentrated on our paying customers at the time, we would have probably finished our work sooner, and we would have been able to look for more clients, which would have brought more money in, which in turn would have allowed us to start fiddling around with other ideas.

But I let my long-term goals blind me. If you play around instead of studying, you will probably fail the exam. Likewise, if you get side-tracked developing what you think will be the next million-dollar app, while your actual customers sit around waiting for their products, your business will definitely fold.

Chapter 2: Serial mismanagement

March 2013

We were approaching the end of our first year in business.

At the time, we were about 65% done with our ERP system, we had a CMS system on the market, and we had still had income from our ERP clients.

We had around 6-7 web design / e-commerce projects, which we were trying to wrap up, to give us a greater short-term cash flow and allow us to eventually hire another developer to help us out with client work.

New work came through collaborative efforts

We started collaborating on projects with the other two start-ups in the office space. One of them was a design and branding studio, and the other one was a digital marketing agency. It was a natural fit for the requirements of many of our customers.

One start-up would do the branding and design, then we would do the web design and website, and finally the other start-up would create FB/AdWords campaigns.

The problem is that, these short-term projects grew in scope, stagnated, went very slowly, or had a bunch of unexpected challenges, thus leading them to take much longer than expected to be finished.

I sat at my desk one day looking at one of my whiteboards which had a list of customers/projects and their statuses. We had a ton projects, most of them half-done. How could I let this happen?

I was in a scenario where I would visit clients every day or so, we would have a ton of meetings, while my designer and developer tried to get most of the work done for our short-term customers, while our long-term customers grew more and more impatient.

You are either a product-oriented company, or an agency, never both

Eventually we finished most of our short-term projects, but money was running dry, and our large customers weren’t paying regularly as they paid based on results. Thus I started borrowing money to pay for my employee’s salaries. This is probably the worst decision I have ever made.

The rational decision would have been to finish up on anything we could, notify our customers, deliver all our source code and set up local machines, and close the business.

But I believed in my business. I believed in success. I knew it would come to us, but it would probably take many years more than I thought.

I started worrying all the time; I didn’t look calm, I didn’t look like I had everything under control, and my employees noticed this. I couldn’t focus anymore, I was constantly re-arranging our processes, trying to find a way to keep moving forward and return to better financial days.

I could see the worry in the face of my developer as well, he didn’t look calm anymore, he was evidently worried if I’d be able to pay his next check, so he decided to leave. I asked him if he wouldn’t mind stating for another week, to finish as much as possible and document the latest modules he had developed. He agreed to this, finished up, and I paid him for his last week at the office.

No hard feelings, I had it coming.

But now I had two problems

Design work for my ERP system had been finished, and we were no longer working on smaller web projects for customers, thus, I didn’t need a designer in the short-term, but I didn’t want to fire her either, as I envisioned a day where she would take care of the design/UX of our mobile apps, advertisements, etc.

Additionally, I no longer had a developer, so I would have to communicate with clients, do our accounting and invoicing, cash cheques, develop, test and deploy the ERP, do the project management, find work for my designer to do, among other responsibilities.

I felt like a mess. But I would keep pushing things forward, for the sake of the business, for the sake of my future.

Chapter 3: The fold

During the summer of 2013 I completely burned out.

I started going into the office late (at around 10:00 AM) feeling pretty apathetic. I no longer saw each day as a myriad of opportunities waiting to be taken. I no longer saw myself as a young entrepreneur with big dreams for success, I simply saw in me a person trying to not get squashed by the pressure, being defensive instead of proactive.

As far as I can remember I’ve always had a path I would follow. I would plan things and always follow through with them. I had diverged drastically from where I thought I would be by that age.

Every time I made a decision (like going to Scotland to study an MSC or opening my own business), my family members praised me for always following through. But I kept judging myself for all the things that went wrong instead of feeling good about the fact that I was trying my best, or what I thought was my best back then.

I also didn’t believe I was depressed, I didn’t even think about it. I thought it was just a rough period I was going through. I didn’t feel sad, nor did I feel happy, I simply didn’t care. That should have been a clue.

I started wondering about my life, what I was doing, where I was going. I realised I was stagnant. My coding style was becoming obsolete, my developer friends were moving to newer and better things (Rails, Angular, Backbone, Ember, MVC3), and I was stuck using the same languages I had used for years.

Fast-forward to Christmas, 2013: I had a talk with one of my uncles during dinner, who was also an early backer of my ERP project. He gave me some valuable insight after I tried to explain what I was going through:

“You have talent, but you have no structure. I’ve met so many people in life who had talent but turned out to be failures, not because they lacked ability or passion, but because they thought of themselves as such. I recommend you go to work for a larger company, where you can learn a lot, and then in the future, if you still have the same amount of passion, try setting up shop again.”

At that moment I didn’t understand what he meant with “you lack structure”. What kind of structure? How can I lack structure if I plan everything so meticulously.

It’s not about planning, it’s about constant and honest execution, it’s about being proactive and constantly communicating the status of each project to your customers, it’s about arriving early at work, living healthily, not taking up too much work which you know you won’t deliver, and being proactive.

After talking with a few friends about this, they acknowledged that I did lack structure. So I decided to put some effort into the interviews I’d be having in January. I realised they were right, I was just too inexperienced, and I was trying to do everything myself, without the capacity to do so.

February 2014

During January and February I talked with recruiters at Google and Amazon. I went through the initial tests, but given my inexperience, and the state I was in, I failed both of them.

The experience was a good one though: Google and Amazon aren’t the only ones out there! I had no plans of going to work at Microsoft, but I’d give it a shot at other hip companies in the valley.

I applied at Github, LinkedIn, Heroku, Rackspace, and about 30 other companies. For my Heroku application I even deployed a Heroku-branded website to Heroku with a video-song explaining why I wanted to join Heroku. Incredibly cheesy, but I thought it would get me noticed.

I received about 3 replies that week, all of them stating ‘not at the moment’. Heroku didn’t even reply. I removed the website shortly thereafter.

One day I was talking with one of my best friends, who lives in Belgium. I was telling him how I felt and how I wasn’t really happy with my life at the moment. He suggested I go to Belgium to live and work; he would help me find a job, and I could stay at his house for a couple of months while I settled down.

Five minutes later I made my decision. Belgium would be my next step. To make it even more interesting, I decided to go without a job secured. I’d analyse my options after arriving, and if I didn’t find anything in the IT sector, I could always do something else.

Some of my clients and family members said I was crazy. One of them even said “you are 27, you can’t go doing stupid things like that anymore. It is too risky, why don’t you just find a company over here, work hard, earn money, and then try again in 3-4 years?”.

My reply was simple: I’m not only trying to make a statement that I need to change my life drastically, but I also want to learn a new language, seek professional growth, get to know new people, travel a bit (I hadn’t taken a holiday in almost two years), and live in a smaller city (Monterrey has 4M+ inhabitants, you can almost smell the chaos and stress of people living there).

Don’t get me wrong, Monterrey is a beautiful city, but sitting an hour in traffic to get to a meeting under 40ºc heat is not really my thing.

Then again, my closest family members and friends supported my decision. I had even gone to a few sessions with a therapist, and he blatantly told me: “You’d be stupid not to do this. So many people would love to do the same, but can’t due to not having the right nationality or skill set, or being tied down by family or work reasons. You have this opportunity right now, so just take it.”

My decision to leave wasn’t rash, blunt or precipitated

Some people might say “how and why would you make such a life-changing decision so fast?” I studied my reasons and noted three main positive points for leaving:

  • I wanted to join a company where I could earn enough money to repay my debts.
  • I wanted to join a well-positioned start-up with at least 25 people, multiple developers and established frameworks, where I could learn new technologies, and acquire more “structure”.
  • I wanted to learn a new language and experience a different culture. Change is always a mind opener, and I had stagnated for too long.
  • I believed it might help me get out of my depression, and destroy my comfort zone.

I marked April 9th on my calendar as the date I’d travel to Belgium and finally put some order and excitement into my life.

Chapter 4: Restart

I spent the last few months selling everything I owned. I sold my computers, monitors, audio equipment and instruments on Facebook ‘buy-sell’ groups, and used the profits to buy my plane ticket.

After all the expenses I had a little over 1,800 euros to survive a couple of months in Belgium, including trip expenses! I didn’t remember how expensive it is over here, but this is something I’d find out further down the road.

Around this time I began to make new plans for my future. I decided maybe I wanted to stop being a developer for a while and dedicate myself to something that requires a completely different skill-set. Something more social.

April 2014: Belgium

I flew to Belgium on the 9th of April and met my friend at the train station.

I settled down at his small 3rd floor studio and started looking for a job. I was motivated to try something new, so I was looking around for different types of companies, but most of them required Dutch. I thought about applying at a restaurant or a bar; but I was scared of trying something new and I couldn’t admit it.

After a couple of weeks I got an interview at a software company. I had an inkling that this is where I belonged even before the interview. I had an upcoming holiday, so I mentioned this during the interview.

This can be a pretty tricky thing to say when you’re not even employed at the time. We reached a consensus: I’d start for a three-week trial period, then go on holiday, and hopefully return to a full-time job if I was a good fit.

The trial period was great, I got to know my coworkers and really enjoyed the vibe. A few days before leaving on holiday with my friends I was told I was accepted. I packed my bags and left with a 3 friends to Australia for a camper-van west-coast trip to Australia, and a couple of days in China.

Yes, I know what you are thinking: Wait, you are indebted, you don’t have a place, you barely just secured a job, and now you are going on holiday? Fortunately it was a cheap holiday, we found a great bargain for the flights, and we all chipped in equally for the rent of the camper van. And, well, I got paid for three-week trial period, so I thought it would be a great moment to relax and finally get over the failure of my startup.

china

The trip was awesome, cumbersome, interesting, tiring, scenic, problematic, and everything else you’d expect a trip of such magnitude to be.

January 2015

After working at this company for more than half a year, things really started to change. I was finally getting out of debt, hanging out more with friends, learning a bunch of new things from colleagues at work, and finally feeling like I was getting over failure.

My passion for AI was re-kindled as a result of having long talks with one of my friends, I started attending conferences and meet-ups. Meeting like-minded individuals makes a huge difference. People also appreciated my talks and presentations at work, which motivated me to start giving more.

I think a big factor was also the ability to experiment with new technologies and frameworks, being asked to do R&D, and being trusted to do my job. This makes a massive difference.

When you are in a good place, and you enjoy what you are doing, happiness starts to creep up on you, and you start cutting back on most auto-destructive activities.


Recap

If you feel the inkling to start your own company, go for it, it is a valuable experience! But if things don’t turn out as you expect them to, know when to pull out. Know when to take a step back, and use metrics, data, or input from everyone you can find, and reach a conclusion: carry on, or drop it. If you already have your own business and things are looking grim, take a few days off, talk with people, crunch the numbers, you’ll work it out.

Here are my key takeaway points if you are planning or running a startup:

  • Be prepared, constantly reassess yourself and your position (not just your startup’s)
  • Keep metrics! the more, the better!
  • Know that some day you might have to change direction (either pivot, downscale, or close up), but don’t let this demotivate you, try harder while things are still on course!
  • Do one thing, but do it as best as possible! This is absolutely critical!
  • You are either a product company, or an agency, not both. Never make custom apps!
  • Name your startup after your product (in the case of software startups). If it is successful and it grows, then make changes further ahead; right now your product is the only thing that matters
  • If you are going for multiple products (e.g. the cosmetics industry), keep your product line small and simple, experiment with new ideas, and kill off what doesn’t work (a la Google)
  • Make a nice, simple, well-designed website, with catchy but straight-to-the-point copy, and make it as simple as possible to purchase and pay for your product
  • Know your strengths and weaknesses, not just the company’s. This will help you with the next point:
  • Know when to make big changes in your life that are affecting your ability to lead progressively
  • Know when to step back, but only if the drive & motivation that led you to start your business have gone. Otherwise, you might find that success is right around the corner, so try harder!

Good luck!

Building a web application for $5-10 per month

SAAS companies seem to fulfil almost every need lately; from VCS to mailing, from authentication to screen sharing, from image and video processing to caching and app hosting. Interestingly enough, a lot of these companies offer basic tiers for free, so it is becoming increasingly possible to launch a web application where most of the work is done by 3rd parties, with a minimal budget.

I started wondering recently if it would be possible to launch such an app, using as many 3rd party services as possible to fulfil the necessary functions (such as authentication and storage), with a budget of $5 to $10 USD per month.

The following is a graph representing my idea for the architecture of such an app, describing the interaction with these services. Most of these are free (except for the purchase of a domain name, Google Apps, and DigitalOcean, which have very accessible plans):

SaasMapWebApp

The goal of my small research was to verify if it would be possible to:

Build an SSL-enabled web application with monitoring + CDN + hosting + authentication using OpenID, striving for minimal cost while offloading as much back-end, data, and functionality to cheap or free 3rd party services.

Every 3rd party service mentioned in this graph had to fulfil the following criteria: 

  • Free (or very cheap)
  • Longevity (has been thoroughly adopted by the market, or major companies)
  • Reliable (at least 99% SLA)

This is a list of tools & services to get your new product up and running for dirt cheap:

  • Domain, DNS, hosting, and caching
  • Authentication
    • OpenID Connect is an initiative by several large companies to make auth simpler (like Persona by Mozilla)
  • Databases & Storage
    • Self-hosted
      • MongoDB is a great/easy NoSQL solution
      • PostgreSQL is widely used and supports SQL/NoSQL
      • MySQL and MariaDB are standard SQL RDBMS that have gone through the test of time
    • Remote
      • Google Cloud DataStore is your database in the cloud (and it has a free plan as well)
      • Amazon S3 (for storage, in case you have a large amount of images/files, optional in this case)
  • Mail
    • Mailbox hosting
      • Pawnmail – Email hosting for free! (tried it for a year and so far it seems to work great)
      • Google Apps – Mailbox functionality for your domain ($5/mailbox) in case you don’t want to set up a server
      • Postfix mail server – You can host it yourself (using Postfix), but be prepared to spend a lot of time setting it up
    • Mass-mailing systems
  • Graphics and icons
    • Unsplash (and Flickr freeuse) offer good images for use in your site for free
    • Font Awesome provides a quality icon font for free
    • Iconifier.net (create your favicon and apple icons for free)
  • Monitoring, logging and analytics

Finally, the application itself could be built in this way:

  • Back-end: Python + Flask + Tornado. Flask is a framework which allows you to generate APIs in a simple/scalable way, and it is very easy to get started. Add Tornado to handle concurrent requests. You could use the PyOIDC wrapper to handle authentication, and the rest could rely on a simple architecture (Entity – DAL – BLL – API).
  • Front-end: Built with HTML5 + Bootstrap (easy way to get up and running fast), AngularJS (with controllers and services to communicate with the back-end), SASS (or LESS), and Gulp to compile/merge everything.
  • Source & deployments: You could use Bitbucket with two private repositories (front-end / back-end) for free, and Capistrano to deploy to your server.
  • Testing: Protractor and/or Jasmine

As easy as that!

If you have any suggestions to how I could improve this chart, or any services that would improve (or further delegate core functionality to free/cheap 3rd party solutions), please let me know in the comments!

* Note: You could use Heroku (which has a free tier) instead of DigitalOcean or Rackspace, but who doesn’t love full control over his/her server?

Living in the cloud

My hard-drive crashed last Saturday, which kind of pissed me off as I was planning on spending Sunday playing online with one of my mates. So I spent Sunday and Monday formatting and re-installing everything.

To my surprise: I didn’t actually loose anything. I hadn’t realised how much of my data actually lives on the cloud.

It turns out 100% of my data lives “up there”.

Over the years I guess I’ve been slowly migrating without noticing the full extent.

This is the list of services I currently use:

  • Google Chrome (I keep my bookmarks and history synced across devices using my Google account)
  • Steam (I use this to purchase games online, I can re-install every game I bought on the platform on a new PC in less than a day)
  • Github (I host all my projects here, including personal projects on private repos. Yeah, I could use bitbucket as well I guess)
  • Spotify (Online music streaming service. I haven’t downloaded iTunes nor have I accessed Grooveshark in a couple of years)
  • Dropbox (I did quite a few referrals and I got bumped up to 56GB of space. Now I store all my photos, videos and music on Dropbox)
  • Google Drive (Why not just use Dropbox? Well… I find Google Drive convenient for documents, so I use it for all my office-related documents)

And that is how I successfully moved everything to the cloud. Hard-drive crash? No problem. Format, re-install, wait for downloads to complete, and you’re good to go.

If you have used other cloud services in the past that you think I should add to my list of must-haves, please let me know in the comment section below.

5 Solutions for MySQL Error 1235

I got stuck for hours the other day with this problem. I’ve used triggers for years in SQL Server without a problem, however, in MySQL the implementation is a bit iffy.

One problem I ran into yesterday while trying to restore a database was error 1235:

ERROR 1235 (42000) at line 1408: This version of MySQL doesn’t yet support ‘multiple triggers with the same action time and event for one table’

I scoured Google for about an hour, and came to the conclusion that there is multiple reasons this error may appear. I explain these reasons and provide solutions for them below.

First of all, I suggest you get a list of all triggers by running the following command:

SELECT trigger_schema, trigger_name
FROM information_schema.triggers
WHERE trigger_schema = 'NAME_OF_YOUR_DATABASE';

Reason #1:  You can’t combine both BEFORE/AFTER with INSERT/UPDATE/DELETE

This PDF describes this issue. The problem is simple: You can’t have BEFORE_INSERT and AFTER_INSERT for the same table. You may have been updating a column BEFORE insert and updating some other table AFTER insert with the ID. I suggest you move some of this logic (maybe the BEFORE trigger) to your code.

Reason #2: AFTER_DELETE sometimes fails with error 1235

You should avoid using AFTER_DELETE triggers. Move the logic to a BEFORE_DELETE trigger if you are going to use the OLD variable. No idea why this happens, maybe it is my specific MySQL version.

Reason #3: You can’t have triggers with the same name (duplicate triggers)

Sometimes you get another error code when doing this, but other times you get the same error 1235 with no explanation. Run the “show triggers” query I stated above and look for any triggers with the same name. Always run DROP TRIGGER before creating/modifying a trigger.

Reason #4: You can’t reference the SAME TABLE you are updating/inserting to in a trigger

For example, if you wanted to set the default password for a user through a trigger upon creating a new user record, you might have tried to do this: UPDATE users SET password = ‘newPassword’;

The correct way to do this is to set the variable in the BEFORE_INSERT trigger. Example: SET NEW.password = ‘newPassword’;

Reason #5: When exporting a database (as an SQL script) you may get database definers in the script

In other words, if you export a MySQL database to a .sql file, the actual file may contain things like TRIGGER ‘mydbname’.’trigger_name’. So if you try to restore it to a database with a different name it would fail. I would have expected another error code because the database it is referencing is NOT the one I am restoring to. Anyway, you receive error 1235 for this as well.

Quick fix: Open the .sql file and replace all mentions of `EXPORTED_DB_NAME`. with a blank string (i.e. replace with nothing).

Summary / TLDR:

Do not use BEFORE/UPDATE triggers on the same table for a same function (e.g. INSERT). Do not use AFTER_DELETE triggers, use BEFORE_DELETE instead. Do not have duplicate trigger names. Do not reference the same table you are updating or inserting to in the trigger, use OLD and NEW instead with SET instead of a subquery. If you are restoring a database from a backup, check that the backup does not contain mentions to the explicit database name (when restoring to a different database name).

Please remember: When creating an INSERT trigger you can only use the NEW variable, when creating an UPDATE trigger you can use OLD and NEW, and in a DELETE trigger you can only reference OLD.

A bug has been found in the system

http://www.flickr.com/photos/73003003@N07/7866585876/in/pool-freeuse/The past couple of years have been really really hectic. Snowden leaked sensitive information, the Eurozone has on-going economic problems, the UK and USA are virtually police states, the NSA and GCHQ are spying on most internet users, there has been widespread protests across the world (Brazil, UK, USA, Siria, etc… “we are the 99%” anyone?). Just last week Glenn Greenwald was detained for 9 hours at Heathrow airport as being a “terrorism suspect”. What on earth is happening?

A bug has been found, or more like hundreds of bugs, and they have been unfixed, even though the issues have been raised.

Typically, socio-political changes occur on a massive scale. Democratic republics become dictatorships, whole countries become communist states, just to turn back a few decades later. When a government breaks down, a massive change is sure to ensue.

So why don’t we implement a system of incremental changes to prevent such breakdowns in the first place? Is it really so hard? 

Most large companies with web products have bug reporting systems or community forums. In some cases the community is involved in developing the changes that are required, which then get pushed to the main code repository. Ubuntu, Google Chrome (Chromium), WordPress, Eclipse, OpenOffice, Android, and others are examples of this. Some other companies are very open to public opinion and offer bug trackers or forums to track issues, for example: Github, MySQL, etc.

Some companies out there lack an effective means of communication, or don’t really care about what the majority of their customers think. Example: Microsoft. They screw up one version of windows, then they listen to feedback and produce a good version, then they think they can handle it from there and produce an aweful version, recognise their fault and open their channels again, and so on.

Another example is Facebook. They keep pushing unnecessary UI updates to their users, who are very pissed off. They want the core part of the UI to remain as-is. If it is not broken, don’t fix it.

Quite a few governments seem to take this stance as a philosophy: We know what is right, let’s fake some listening on our behalf but keep pushing our changes. They are not listening, and it has been backfiring on them these past few years.

The world changes fast, our societies change fast, why can’t the government change fast as well? If I was in charge, the first thing I would do would be to open-source the tax laws, the constitution, and other important legal documents. Why? The people know what is best: The majority will vote, the best ideas will be upvoted, releases can be scheduled on a yearly or bi-yearly basis, ensuring everything is kept up-to-date.

Is it really so hard to say you are a democracy and really be a democracy?