You Have the Right to Buy some Shares… Soon!

calculatorIn my latest article, I mentioned stock options as one of the interesting perks in working for a startup. But the truth is that it is not really easy to understand as an investment instrument, and you can easily find a lot of resources how stock options work from the employer standpoint, and not that much from the beneficiary’s point of view. In addition, there are different mechanisms in different countries, with different tax systems, and it’s very difficult to understand. So let me try to explain stock options in Belgium. First of all, let’s talk about shares. When you create a company, it must have a starting capital, a certain sum of money in the bank to let you invest to start your activity. Typically, this starting capital is the only value in the company, so it also corresponds to its valuation. In Belgium, the legal amount to start a limited liability company (SPRL) is 18600€. This so-called social capital is represented by a certain number of shares, that are attributed to the founders, usually proportionally to their contribution to the initial capital. So let’s say John and Marc create the SuperCorp company with an initial social capital of 20000 euros, represented by 100000 shares. Each of them, brings 10000 euros to the table, so each of them gets 50000 shares. The value of each share is set to 20000/100000=0,2€. As the company grows, works and develops its business, its valuation increases. There is value created in knowledge, intellectual property, various assets that it may develop or acquire, and more importantly all the perspectives that it offers for the future thanks to the work that John, Marc and their employees do for SuperCorp. This created value is not financial yet. But if John or Marc decides to sell some of their shares to someone else, they will take into account the estimated current valuation of their company. Let’s say John and Marc estimate that all the work they put in is worth 80000 euros after a year, so that means the company’s estimated valuation is 20000+80000=100000 euros. So each share is now valued at 1 euro. It is all virtual until someone is willing to buy some shares for that price. Let’s say Simon comes in and proposes to buy 20% of the company at the current estimated value. One way to do this transaction is to transfer some of the shares of the founders to the new buyer. So for example, Marc and John could sell 20% of their shares to Simon, and we would end up with the following capitalization table:

  • John: 40000 shares, 40% of the company, worth 40000 euros
  • Marc: 40000 shares, 40% of the company, worth 40000 euros
  • Simon: 20000 shares, 20% of the company, worth 20000 euros

Here, the total number of shares doesn’t change, John and Marc each have less shares in the company, but each share is now valued at 5 times its initial value. The problem with that mechanism is that the company doesn’t get any money in that operation. John and Marc personally sold 10000 shares each and they received 10000€ each in the process. So basically Simon just bought a right to ownership of a part of SuperCorp, but won’t participate in its investment. Let’s say Simon is an investor, and his goal is to buy some shares of the company in exchange for some financial capital for the company, in the hopes that SuperCorp will use this new financial capital to increase its valuation even further and allow Simon to sell his shares with a premium sometime down the road. One way to do this is to create new shares of the company instead of selling existing ones. If John and Marc create 25000 new shares and sell those to Simon, he will own 20% of the social capital, which is estimated at a value of 20000 euros. So we will end up with the following capital table:

  • John: 50000 shares, 40% of the company, worth 40000 euros
  • Marc: 50000 shares, 40% of the company, worth 40000 euros
  • Simon: 25000 shares, 20% of the company, worth 20000 euros

The results of this operation are the following:

  • the company has 20000 euros more on the bank account to invest.
  • the value of the company before the investment was 100000€ (pre-money valuation)
  • the value of the company after the capital increase is now 125000€ (post-money valuation)
  • each of the 125000 shares is worth 125000/125000=1€.
  • each original founder now owns 50/125=40% of the company. This process is also called dilution.

Note that all of these figures are entirely fictional and chosen merely to ease calculations. Now that we understand these systems of shares, let’s talk about stock options, or more specifically warrants (we’ll use them interchangeably here even though they are slightly different). Warrants are a financial instrument used to incentivize employees to stay with the company as long as possible and do their job to their best. Simply put, a warrant is the right to buy a share of the company later at the price it has today, which is called exercising the warrant. And since the value of the shares is supposed to go up, the goal is to make it possible for the employee to make a profit when he buys the shares associated with his warrants, and then resells the shares at the value they are worth then. That is for the motivation to participate in the success of the company. The motivation to stay is created by what is called a vesting schedule. Basically, the vesting schedule says that the employee who subscribes to warrants has the right to vest (or exercise) these warrants only in a certain timeframe. Typically, 25% of the warrants can be exercised at the end of the first year in the company (that is called the cliff), and then 1/36th of the warrants can be exercised at the end of every month for the following 36 months (3 years). So if an employee is given 2500 warrants, that means he will be able to exercise 625 warrants (and get 625 shares) in one year, and then about 52 more warrants every month. If he leaves the company during the first year, he will lose all of his warrants. If he leaves during his 13th month of the company, he will be able to buy 625 shares of the company at the price they were at when he got the warrant, whatever the increase in their value. He is not forced to exercise the warrants: if he doesn’t have enough cash to buy the shares or if their value has gone down, he can simply give up on his warrants. So in our example, let’s say that when Simon comes in as an investor, John and Marc also hire Steve as a developer and they want to incentivize him to go the extra mile and stay longer. So they agree with Simon on the following:

  • John keeps 50000 shares, 40% of the company, worth 40000 euros
  • Marc keeps 50000 shares, 40% of the company, worth 40000 euros
  • Simon gets 22500 shares, 18% of the company, worth 18000 euros
  • 2500 shares are set aside in the warrant plan for Steve, representing 2% of the company, worth 2000 euros

So at the end of the 4-year vesting period, Steve will be able to buy 2500 shares of the company for 2000 euros. Normally, within four years the value of the shares will have greatly increased but Steve will still get a preference price thanks to the warrant, and he will be able to sell those shares for a much higher price. Note that those 2500 shares will not represent 2% of the company anymore by then, because other investors will have joined, more shares will have been created, thus diluting the existing shares. But a slightly smaller percentage of a much larger cake is still very interesting. Let’s talk about taxes now. In Belgium there is a very special tax system for these warrants. The general principle is that you have to pay your taxes right when you receive the warrants. So the warrants are basically free, and they don’t have any value yet, but you still have to pay some taxes on them as if you had received a revenue. Typically, these taxes represent 18% of the face value of the warrants. So in our case, the year Steve gets his 2000 euros worth of warrants, he will have to pay taxes on a taxable basis of 2000*18/100=360€. What if Steve decides not to exercise his shares in the end, or can only exercise a portion of them because he leaves the company? Well that will be too late then: the taxes are paid, and there is no refund. But there is an upside: in exchange for this advanced payment, Steve won’t have to pay any additional taxes when he exercises his warrants and sells the corresponding shares with a bonus. So let’s say Steve’s shares are worth 20000 euros when he can exercise the warrants to buy them, he will still pay 2000 euros and sell them for 20000 euros, receiving a 18000 euros bonus in the process, on which he won’t have to pay any additional taxes. That’s a nice deal, isn’t it? Woohoo! There we are… well… almost. Because there is yet another small trick with those taxes. Basically, if Steve exercises his warrants as soon as he can to buy the associated shares, it’s more paperwork and it’s only interesting if Steve intends to keep those shares for a long time instead of reselling them right away. So to incentivize Steve to hold onto his warrants and only exercise them to sell the shares directly, there is a 50% tax discount if he commits to exercise his warrant no sooner than the beginning of the fourth year after he got them. If he takes this commitment, he just has to pay taxes on 9% of the value of the warrants in taxes, which represents a taxable basis 2000*9/100=180 euros. And what happens if he leaves the company before this commitment ends, you might ask? Well in that case he can exercise the warrants he is entitled to according to the vesting schedule, and then pay the tax difference. Last element that really makes these warrants particularly interesting: in case SuperCorp is acquired or goes public (enters the stock market), all of Steve’s warrants are automatically exercised, and the vesting schedule is simply ignored. So if SuperCorp is acquired for 10 euros per share after two years, Steve will still be able to exercise his 2500 shares and make a 22500-euro profit, even though he should be entitled to only half of his shares after those two years. There are still a couple of subtleties I didn’t mention here, but this is the general way warrants work and are taxed in Belgium. And this explanation has been double-checked for correctness by an expert accountant. So I hope it was clear enough. If you still have questions about warrants, or remarks to improve this explanation, please feel free to leave a comment down below. And in any case, don’t forget that we are hiring developers, that we have warrant plans, and that we even offer premiums for referrals. Just sayin…

Top 7 Reasons Why You Should Work for a Startup (clickbait intended)

It’s been a while since I’ve posted something here but as they say, desperate times… So as you might not know a lot has happened in my professional life since I wrote here. Last time I was getting ready to start a new job for Instaply, a startup based in the US but with an awesome team spread around the world. I worked one year with them, and then I was invited to be a coach for NEST’up Spring 2015. Then last month, I started a new job for another startup, based out of Brussels this time, called Take Eat Easy.

Just to get it out of the way, since the topic of this blog post is going to be about the advantages to join a startup, let me come back to the reasons why I left Instaply after just one year. It has nothing to do with the startup environment itself, and everything to do with the reason why I chose to go freelance in the first place: I love to choose the projects I work for and the people I work with. When one or the other becomes something I have to accomodate instead of something I fully enjoy, AND once I have tried everything in my power to make things go back to where they were at the beginning without success, I start listening for interesting new opportunities. That is exactly what happened here. I would have loved to keep working with those great developers. I didn’t believe enough in the project anymore to fully enjoy working on it. I tried everything I could to steer it back to where I would have believed 100% in it. I was not the only person to decide of course. I was offered a coaching position for a renowned startup accelerator I co-created, I moved on. The funny thing is that the first season of this same accelerator, 3 years ago, saw the birth of another startup: Take Eat Easy, yes, the same where I work now. Small world, right?

Now that we’ve got that out of the way, let’s get back to the present time now. When I joined Take Eat Easy, I made it clear that I didn’t just want to code, I wanted to have a greater impact on shaping the future of a business I really believed in: helping people eat better from the comfort of their home. So I joined as a VP of Engineering. If you want to know the difference with the role of CTO, you should read this article. So now I have the opportunity to keep building some software, but also to build a team with the best possible methodology and structure for the years to come. As a team builder, one of my main responsibilities is to grow the team, to recruit great developers. And that’s what brings me back to my blog.

Right now, we are looking for 3 key persons:

  • one or two Java backend developers to keep building our core system and make it stronger as we release our platform in multiple countries
  • one or two web frontend developers, familiar with Java (JSP, Spring MVC, etc.) but also very strong with HTML5, CSS and Javascript, to make our customer website and our internal tools completely ergonomic
  • one or two Android developers to bootstrap the development of our brand new mobile app, and help us with the development of our apps for restaurant managers and bike couriers, among other things

And I’m not gonna lie: I was expecting to get more applications. The fact is that we are looking for senior developers because we don’t have time to train newbies for now (sorry guys), and we need strong developers with enough autonomy and creativity to take matters into their own hands and really build the backbone of a great team. But still, I can’t help but wonder why we don’t get more applications.

First hypothesis: people just don’t know we’re hiring. Well at least now, you know (and your best developer friends will soon know, right?). I also published a few messages on targeted LinkedIn groups, there was a lot of press surrounding our recent funding round, and we do have our recruitment website where you can see our awesome industrial office space. But maybe it’s not enough.

Second hypothesis: the technologies we are working with are so commonplace in big corporations and institutions like the European Commission, that offer good paychecks and a comfortable 9-to-5 job, that developers are just too comfortable there to get interested in anything else. But I’ve been there, I’ve done that, and I know that working for those big institutions can look like a golden jail and eat your soul from the inside out.

Third hypothesis: startups are so rare in Belgium, that few developers actually know what it’s like to work for one, they don’t see all the benefits, and it sometimes looks too good to be true. So let me set the record straight and give you my top reasons why developing for a startup is so awesome (and of course, even more so for Take Eat Easy :oP )

Have an impact

More often than not, when I’ve worked for big companies, I never met the end users of the apps I worked on. Sometimes, the software I wrote never got to a real end user because the project was just dropped before the end (which tends to happen when a full waterfall development cycle takes a few years to complete before you realize your software is already out-of-phase with your market).

In a startup, not only can you see your final users, but you can meet them, touch them, feel their pain, and more importantly feel the joy and happiness that your software brings to their lives. When was the last time you could say that from the invoice checking ERP/SOA system your worked on (real world example)?

Learn some startup skills

I know so many developers who stay in their 9-to-5 job in a big company and save money for the big day when they will finally take the plunge and turn one of their million-dollar side project idea into a real business. I used to be one of those.

What if you actually learned some useful things while saving for your big coming out? What if you actually witnessed first hand what it takes to be in a startup rollercoaster before you build your own? What if you used this experience to see if you are actually CEO material, and in the process, put your full power to good use by helping a business you actually believe in? There actually is a middle ground between a boring dull job for a pharma company and creating your own startup: it’s called an exciting job for an existing and thriving startup.

Bonus: where are you more likely to meet your potential future cofounders, team mates and investors, at the European Commission or at the heart of the startup ecosystem?

NB: if you are already further down the line and you are planning to launch your own startup within a year, this doesn’t apply. Working for a startup is a long-term commitment and you will only benefit fully from it (and let’s face it, the startup will only benefit from your expertise) if you stay long enough.


9-to-5 jobs are called that for a reason: so long as you clock in at 9 and clock out at 5, you’re good, no matter what you have really done in-between. If you do less than that, you can already feel the warm breath of your manager in your neck (and probably smell his bad armpits with this weather). And those companies are so much about appearance, that you have to disguise as a serious person, with suits and everything. And you have to attend meetings, watch boring Powerpoint presentations, play political games, and the list goes on forever.

Nothing like that in a startup, really. It’s pretty much like McDonald’s. Come as you are. Geeky t-shirts, flip flops, 3-day beard, whatever. So long as you do your job, you get results and produce awesome software, we don’t care how you look or when you come to the office. As a matter of fact, we know you are going to stay late, because you will love your job and your team mates so much that we will have to send you home! And no bullshit meetings or layers and layers of management. We are not here to justify our paycheck, we are here to get some shit done, and make the world a better place, one distributed database at a time (Silicon Valley pun intended). Anyway, you get my point.

It’s an investment

Whatever you do for a big company, where is the incentive to do your job better today than yesterday? But who am I kidding, if you are reading this your are probably such a perfectionist professional that you don’t need any incentive. But what about your colleagues?

In a funded startup, not only is the paycheck completely comparable to your current corporate one and probably even better, but you get one thing the big guys will never be able to offer you: stock options baby! I know, this is not a salary, and I am the first one to say it should not be bargained as one. It is merely a bonus. Some would even say it’s a gamble, and in some sense it is. But what do you call a bet in which you can influence the odds of successful outcome with your hard work, sweat and creative ideas? I call that a pretty good bet, one that won’t make you rich for sure, but might go a long way in setting you up for your own startup some day… or anything else for that matter. How about that?

Awesome colleagues

How many times have you complained about all those guys around you, who are not all bad, but have become so infatuated by such comfortable working conditions, that they have completely stopped questioning the status quo and the misery of their conditions. But you are stronger than that, right? You are still too young for that shit, huh?

Then how about working for a company that doesn’t settle for the average Joe Does-the-Job, but strives to only work with the most creative, no-bullshit software builders it can find? How about being part of a great team, and even participating in building it with all the great developers you have met throughout the years, and thus influence your stock options value even more?

Cool perks

Do you remember the last time you yelled at your computer because you still don’t understand why you get to build complex user interfaces and innovative backend systems on the same gear as Julie from accounting? And that chair, boy that annoying old chair that was probably already used by card punchers if you know what I mean, and has likely squeaked though Y2K bug times. And don’t get me started on those unbearable cubicles and that awful stuff they call food at the Sodexo joint downstairs (confess to me: when people ask you how it is, you still answer “it’s fine!” with an awkward smile). I’m barely exaggerating, admit it.

Of course, a startup is so much better on all those fronts. I needed a big 27-inch screen to do my iOS storyboarding wizardry properly, I got the green light for one in a couple of days, and now it’s proudly sitting on my desk. Inspiring creative work environment? CHECK! Awesome food delivered straight from the most trendy restaurants in Brussels? What else? (ok, the Take Eat Easy factor might help there). All those little thing that make you smile your way to work, along with Magic Assembly breaks, no-nonsense days-off policies, do you really need me to go on?

The (real) Agile way

I’m not talking about post-it fakery here. No “of course we do Agile! RUP is agile, right?”. Ever heard of ScrumFall? Remember those post-it notes that you ordered to migrate your project to Kanban, and that ended up arming your post-it war with your cellmates across the road, out of despair?

In a startup, Agile is not something you do to shake up your manager’s certainty, or to make your life as a developer less miserable in an Excel-driven management world. It’s a necessity. It’s the norm. It is what you do because it’s just the most efficient way to get shit done and to ship actual software out the freaking door and into the hands of your feedback-blowing users. Real Kanban with regular retrospectives with which you can customize the process to fit your team’s way of working in full collaboration (not against) a business that actually craves for your every line of juicy code.


That’s what a startup really looks like. And of course that’s what OUR startup really looks like, and will do even more so if you loved every advantage listed above and want to make them even more real by joining us.

Of course, I can already hear some of you in the back whisper: “oh, but that’s not all rosy, you will probably do crazy hours, and you will have a lot of responsibilities, and it might not work out in the end, it’s not safe out there, it’s a cutthroat jungle, and investors will make a lot more money than you, and your kids will see your sorry face a lot less, and yes, you will learn, but you will fail a lot to get there, and…”

I won’t deny. That’s all I have to say: I won’t deny any of that. I’ll just let you read it back out loud and leave you with that and my direct email address: [email protected]

What a year!

Usually, this time of year, it’s time for looking back on the past months and reflect on what has been accomplished. Last year I didn’t even bother because I was simply too depressed. I spent a couple of weeks isolated in a chalet in Canada, I needed to regroup, I needed to flip a switch. And boy I did!

One year later, so many things have changed in my life it is scary to think about it… though energizing.

One of the biggest decisions I made during my cold retreat was to finally tackle the pain I’ve been struggling with ever since I was a child. I had started my first diet when I was 3 and struggled with my weight ever since. For the past three years, I have been working on the roots of this disease, of this malicious relationship I had with food. But it was time to face it head on and do something concrete about it. In January, I had my first appointment with a nutritionist at the Brussels Weight Loss Center, and it was the beginning of a long but inspiring journey. I was too far off to just go on another diet, the only durable solution for me was surgery, so I did what had to be done… and told the story of it (in French). The surgery happened in early July, and I’m very pleased to report that I have already lost 55 kilograms over the past 6 months… and counting. The goal is to go back to 100 and get out of medical obesity, so things are on track.

When I took the decision to have the surgery, I knew I needed some financial and professional stability, both to prepare myself and to recover properly. I couldn’t afford to live the stressful entrepreneur life anymore. So I accepted a new consultancy mission for a big bank. Sure it wasn’t fully aligned with my values and goals in life, but it paid the bills nicely and allowed me to focus some attention on my health. I started working there in early April this year and I learned a lot. Then a few months ago, a Belgian friend of mine who had moved to San Francisco and joined a promising startup there told me they might soon need some help on their technical team. It was not an immediate need, but I started dreaming of settling in this city that I love. Then a couple weeks ago he got back to me. That was it, they needed someone now! My relocation plans had changed a little (I’ll tell you how) but I really wanted to join them. I talked to him, I talked to the CEO, I met the backend developer… and the deal was sealed in enthusiasm. So starting in January, I’m back in the startup world, but not with my own company. I’m a developer for Instaply and I’m thrilled about it.

Last (not really), but not least, I told you my relocation plans have changed in the past few weeks. Here’s why. When I took the decision to have gastric bypass surgery, it was thanks to a lot of online resources and especially testimonials from other patients who told their story in videos from a few months before to a few years after the procedure. It really helped me ease my concerns about the surgery, its consequences, its challenges and the overall journey that was ahead of me. Lucky for me I understand English without too much trouble. But then it struck me that very few French-speaking patients dared to talk about it, which allowed a lot of false ideas to spread, and the surgery to be somewhat shameful in the French-speaking world. So I took it upon myself to create my own Youtube channel, my own community, my own blog, with a triple goal in mind:

  • Inspire patients
  • Educate their family and friends
  • Inform the general public

But there was one side effect I didn’t anticipate: those videos allowed me to find my special someone. I thought that after I would get back my self esteem as the result of getting back in my own driver seat, I would have a crazy “catch up” period, having fun, meeting a lot of people, getting out and not taking things seriously. But as often in life, surprises are even better. She had the same surgery I did, she watched my videos, she called me to ask questions and share her experience with me, and we quickly noticed we shared much more than an obesity journey. I used to find this concept very overrated, but now I can tell you with full certainty that I found my soulmate. She is everything I had never hoped for, she makes me feel more alive than ever, she makes me enjoy every moment of life, here and now, like I never could, and believe me when I tell you that’s quite a feat. Things went incredibly fast between us, but it was just obvious, and being far away from her became so painful, that I took the decision to move back to France, near where she lives, and be happy there. Now of course this relationship and decision to move come with greater responsibility too, because she has two kids who are going to be part of my life too. But even though I’m fully aware of the challenges ahead of me, I’m not scared. It’s fair! And this move is fully compatible with me working remotely from home for Instaply, so everything is just perfect.

So… new body… new job… new girl… and kids. What did I forget? Oh yeah! Back in October we went to TechCrunch Disrupt in Berlin with the PeerTrust team. PeerTrust is this side project we had been working on for 18 months, trying to find a solution to this trust problem that made Kodesk (my first startup) fail. And PeerTrust failed to raise the enthusiasm that was necessary to keep us on track. So we decided to stop working on it. But on the other hand, it was obvious that we enjoyed working together very much, and none of us wanted to be a consultant for big companies our entire lives. That’s when it struck us: why not create our own agency, work for customers we chose, with our own tools and more importantly with our preferred team. Hence was born ZeTeam! I won’t go too much in detail about it yet, because things are still in their infancy, but suffice it to say that if you or someone you know is looking for innovative and pragmatic software solutions for their business, feel free to contact us or keep in touch. I’ll definitely keep you updated here in the coming weeks.

So there we go. 2013 is soon coming to an end. I’m on my way to enjoy the best holidays of my life, then 2 months between 2 jobs, finishing my mission for the bank and ramping up on my Instaply work, and then moving back to France with my sweetheart in March. Things are very exciting. So have a merry christmas, a happy new year, and don’t forget your destiny lies in your own hands. Be happy, and you will be even happier.


And you’re wondering why Europe sucks for innovative startups?

I’m experimenting with a new collaborative consumption business idea at the moment and I’m trying to set up a payment processing infrastructure. I contacted Paymill, the European clone of Stripe but they seem to be stalling on activating my merchant account. So I got in touch with Braintree Payments, since they opened their services for merchants in Europe last year and they are the payment provider of AirBnB, THE pioneer of collaborative consumption. But this morning, I got the following email:

We would love to have you as a business partner, but unfortunately we cannot move forward with your application. Your payment model is something called Third Party Payment Aggregation.  This means you are accepting payment on behalf of someone else, and then passing on payment to them at a later time. TPPA is the highest risk business model there is in payment processing. Unfortunately we do not have a European sponsoring bank willing to underwrite applications for companies with this payment model at the present time.

And they add a link to a post on their blog, explaining what TPPA is and why it is risky.

Now I understand the risk but then it got me thinking. Isn’t it a bank’s job to manage the risk and be paid for it? And what does it mean for the future of collaborative consumption in Europe? Given that collaborative consumption is on its way to replace ad-supported free services as the leading business model family, and that the go-to option for collaborative consumption revenue stream is commission on transactions, how can we do that without a bank supporting this model?

So the next step is to see how existing collaborative consumption businesses in Europe are doing. Let’s try first for 9flats, the European clone of AirBnB (they’re based in Germany). Unfortunately, their terms and conditions do indicate that they process the transactions themselves (“9flats undertakes to pay to the host as the purchase price for the receivable the amount of the accommodation price minus a commission (receivable price)”) but they don’t mention what payment processing service they’re using. Now let’s look at BlaBlaCar, one of the leading ride-sharing services in Europe. Here is what they say in article 2.3 of their Terms and Conditions: “it is the Driver’s responsibility to collect payment from the Passenger at the time of the Trip”. Woops! There seems to be a pattern of avoidance here. I posted a message on OuiShare‘s Facebook group and I got the reference of Leetchi. Going to their website, they say they are using Payline to process payments, which I had never heard about and will investigate (it seems they have the French subsidiary of BlaBlaCar as a customer too). But the smaller the operator, the less likely it is they will support modern API’s enabling mobile payments for example (which both Braintree and Paymill do).

This is going to be harder than I thought. But I guess the point of this post is this: if you are thinking of establishing a business in Europe whose business model relies on taking commissions on transactions, be prepared to fight… or flight! The US of A are so appealing to me right now…

Top 5 reasons why you should consider Groovy and Grails for your enterprise software architecture right now

I’m so amazed when I see how so few companies are using Groovy and Grails right now, and are still using old stuff like Spring and Hibernate, that I thought I would jump in and do my share of educating. And why not give in to the fashion of top lists while I’m at it? So here it goes: if you are an enterprise software architect and you have a lot of Java in your world, you might want to read carefully what follows.

Continue reading Top 5 reasons why you should consider Groovy and Grails for your enterprise software architecture right now

Book publishing is dying? No kidding!

It’s been a while since I posted my last article here. But tonight I just can’t help it. For a few weeks I’ve been reading MongoDB in Action, from Manning, as an eBook on my iPad. And for a few days, since I started diving into the more complex parts of it, I’m struggling with errors all over the place. And I’m not just talking about typos here, I’m talking about massive errors that completely change the meaning of code samples and leave you wondering about your own sanity and stupidity. Here are a few examples coming from their Errata page:

Page 81, First code snippet

First off, how the hell am I supposed to match there erratas with my eBook? An eBook has no such pages, it depends on what you’re reading it on, the size of the font, etc. Now I know these erratas are designed for paper books originally. But these are technical books we’re talking about. How many technical people are still reading ink on dead trees around here?


category = db.categories.findOne({'slug': 'outdoors'})
siblings = db.categories.find({'parent_id': category['_id']})
products = db.products.find({'category_id': category['_id']}).
                            skip((page_number - 1) * 12).
                            sort({helpful_votes: -1})


category = db.categories.findOne({'slug': 'outdoors'})
siblings = db.categories.find({'parent_id': category['parent_id']})
products = db.products.find({'category_id': category['_id']}).
                            skip((page_number - 1) * 12).
                            sort({average_review: -1})

In the paragraph before this code sample, you can read that we’re looking for siblings of the current category, and then in the original code sample above, you see the code is looking for children, not siblings. So you start hitting your head agains the wall, reading the same sample over and over again, trying to make sense of it, and then you locate the errata and you see THIS!

But we’re not done yet, there’s more, there’s worse!

From the same errata page:

The line reading:

emit(shipping_month, {order_total: this.sub_total, items_total: 0});

should read:

emit(shipping_month, {order_total: this.sub_total, items_total: 0});

You can read it again… and again… no, there’s no difference between the original and the correction. It’s exactly the same fricking line! The worst part is that you can feel there’s something wrong with this line. It’s obvious that it seems odd to start a map-reduce with different starting points, but which one is the right one? Not so easy to figure out when you’re encountering your first map-reduce. So what, is there an errata page for the errata page somewhere?

But my favorite is definitely the next one:

The lines reading:

var tmpTotal = 0;
var tmpItems = 0;

tmpTotal += doc.order_total;
tmpItems += doc.items_total;

return ( {order_total: tmpTotal, items_total: tmpItems} );

should read:

var tmpTotal = 0;
var tmpItems = 0;

values.forEach(function(doc) {
  tmpTotal += doc.order_total;
  tmpItems += doc.items_total;

return ( {order_total: tmpTotal, items_total: tmpItems} );

Ah! So that’s where this “doc” variable comes from! How the hell could two entire lines be removed by mistake? And then I noticed something odd. The last line of what’s supposed to be the original is wrong. What I’m actually reading in my version of the book is:

return ( {total: tmpTotal, items: tmpItems} );

And not:

return ( {order_total: tmpTotal, items_total: tmpItems} );

So same question again… Errata for this errata?

So to sum it up: Manning is a technical editor, they publish technical books for technical readers. They release draft versions in advance for the community to review them on the cheap. Then they sell you eBooks for 30$ a pop, the final version is still littered with massive errors. And then they can’t figure out how to patch your book so they write an errata page that is simply unusable because A- you can’t match page numbers with an eBook and B- the errata page itself is full of errors.

And they wonder why their industry is on the decline? Seriously? I’ll tell you what, next time I’ll save a few tens of bucks and I’ll find “another source”…

And in the meantime, I just found out about Sigil. So I’ll see if I can patch the book and republish it, just as a provocation.

Why I switched back from Heroku to CloudBees

I used to have several grails applications deployed on CloudBees. I liked the fact that they were Java all along, I liked the smooth integration between Jenkins CI and the deployment environment. I really liked the fact that you could hide an application behind a username and password during testing. I just hated their design (seriously guys, hire a good designer) and I was not thrilled by their catalog of third-party services. So when Heroku announced that they supported Java applications, and then Grails applications, it was not long before I migrated all my apps over to their servers.

But more recently, I’ve had issues with a more plugin-rich application. And tonight, after several weeks of fighting, I migrated this app to CloudBees for one general reason: Heroku was really designed with RoR in mind, and even though they made a new stack for java apps, the old rules still apply:

  • if an application takes more than 60 seconds to boot, it is crashed. There is no way to adjust this timeout, and we all know that it can be pretty common for a java app to take a little more than that.
  • another consequence of this slow boot intolerance is that an application is automatically put in sleep mode after several minutes of not being used. Consequence: when someone comes to the site after such a period, say, in the morning, the app is rebooted out of sleep mode… and sometimes it crashes again. Terrible for availability. And apparently, even if you pay, there is no way to prevent that sleep behavior and to keep your app alive all the time. Actually to be fair, there is a way to disable idling: once you scale up to 2 dynos, idling is disabled.
  • since your app can be sleeping, implementing long-running background processes is very complicated too. You have to use their worker processes, but there is no documentation on how to do that in a java application, let alone in a grails app.
  • last but not least, even though I tried to limit the amount of memory of my app, it kept going over 512MB, which is the absolute limit. Once again no way to change that. It doesn’t crash my app, but it clutters my log with plenty of annoying warning messages.

That plus the fact that they refused to answer my last support request about memory consumption and marked it as solved when it got hard. The fact that they don’t have an easy continuous integration feature was not a deal breaker, but it adds to the rest.

Now I don’t know if CloudBees will be better on all these points, but it looks good on paper. Unfortunately, we java devs don’t have a lot of choice when it comes to cloud deployment. CloudFoundry is way too low-level, AppFog is still in private beta, and Amazon Elastic Beanstalk is awful for deployment (40MB take a long time to upload). What other options do we have that I’ve never heard of?