This is Fundbase Nerds, written by the team behind Fundbase.

Go to Fundbase  

Efficient Frontier

Posted by Etienne Baume on

Different combinations of securities produce different levels of return. The efficient frontier represents the best combination of these assets i.e. those that produce the maximum expected return for a given level of risk. The efficient frontier is the basis for modern portfolio theory.

Modern portfolio theory was introduced by Harry Markowitz in 1952. Markowitz is a professor of finance at the Rady School of Management at the University of California, San Diego (UCSD). He later was awarded the Nobel Prize in economics for his work in the field of modern portfolio theory.

The core of Markowitz’s MPT is the observation that investments should not be seen as isolated assets but observed in the context of the whole portfolio. He found that there are three parameters that describe the contribution of each individual asset to the overall portfolios:

Modern portfolio theory assumes that investors are risk averse, meaning that given two portfolios that offer the same expected return, investors will always choose the less risky one. Consequently, an investor is only willing to take on more risk if he gets compensated with higher expected returns. Equally, an investor who wants higher expected returns must be willing to accept more risk. The exact trade-off will be the same for all investors, but different investors will evaluate the trade-off differently based...

continue

Arbitrage

Posted by Etienne Baume on

What is arbitrage and how does it work?

Originally the term arbitrage referred to the activity of simultaneously selling and buying a security at different geographical locations. Why would one do that? Well there’s a very simple answer. Before the development of the internet it was not that rare, that a share of a company traded for a different price in New York than it did in London. Therefore, a trader was able to make a risk free profit off of the price difference. To put it in other words, arbitrage is the pursuit of exploiting a price inefficiency.

Today price differences of identical securities are highly unlikely, that is why nowadays arbitrage traders buy and sell similar securities and hedge the disparities.

Arbitrage is a trade that exploits the price differences of identical or similar financial instruments on different markets or in different forms.

Arbitrage strategies aim to be market neutral; in other words, through a combination of different financial instruments the arbitrageur seeks to generate returns with minimal volatility. Market neutral strategies minimize market exposure by pursuing a beta of zero, meaning that performance is uncorrelated with the market. The targeted return is to be made solely through alpha, relating to the skill of the manager.

There are different market neutral strategies. The three most common ones are; fixed income arbitrage, convertible bond arbitrage and statistical arbitrage. All strategies work with highly complex securities...

continue

Keys to a Successful Product Launch

Posted by Wendell Fernandes on

Fundbase is known for its intense and relentless attitude for amazing products and user-centered solutions. We strive to deliver functional products that are both intuitive and creative and these are in fact great points in a successful journey. It’s no surprise that any product that is launched needs to have the right pieces in place and one can never forget of all the road blocks that might arise.

When we talk about a product to launch it is imperative to consider what we will face in the road ahead and one can never underestimate the meetings, discussions, ideas, brainstorming sessions, what problems we want to solve, why we might go towards “A” direction rather than “B”. Simply put, there needs to be a concise reasoning for every decision made in this process and at Fundbase we love it!

The Story Behind The Product

Back 6 months ago, we were in a hurry to create an experience that would be unique to say the least. There are literally tens of thousands hedge fund investors and institutions out there, each with their own deals and portfolios to manage. The aggregation of analytic reports, documents, notes, portfolio management tools are only a few of many different assets a fund manager needs to be able to oversee and having one main platform to manage all these is critical for any successful fund/portfolio manager – Fundbase began to research, brainstorm and discuss the possibility of improving its platform to accommodate this venture and we are calling it Fundbase Alpha...

continue

Smart Document Downloading

Posted by Marek Stanczyk on

We have a module that parses documents from email attachments that our partners send to us. Sometimes, however, instead of attachments, the mail text contains download links (often in a mess of HTML tags). So we parse the message body (using regular expressions defined by our operations team), collect the URLs, and retrieve the documents with OpenURI#open.

OpenURI is a nice wrapper for Net::HTTP (and other libraries) which can handle redirects, proxies and other issues. But as usual, when dealing with user input, it’s easy to hit limitations of default libraries.

SSL Issues

It’s not rare that a server has a missing or invalid SSL certificate. This should normally raise eyebrows, but since we trust our sources (at least to some extent), and we really want the document, we’ll ignore the SSL verification:

open(url, ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE)

HTML Garbage

The message body that we parse is often a HTML source, and we can end up with a URL that contains HTML entities, e.g.

http://example.com/document?id=1&foo=bar

Clearly, this is a "&" encoded to "&". We don’t want to reinvent the wheel, so let’s use the htmlentities gem and decode the URL first:

url = HTMLEntities.new.decode(url)

results in

http://example.com/document?id=1&foo=bar

Redirection issues

With a few easy fixes under our belt, we hope for the best, but it doesn’t take a long time for new issues to be reported. The original URL is often a redirect to a malformed URL, e.g. contains...

continue

Why knowing Greek can help investors

Posted by Etienne Baume on

An introduction to the technical risk ratios alpha and beta

alpha

Alpha is a risk-adjusted measure of performance. It measures the extent to which a fund developed compared to an index. In other words, it shows whether the fund has performed better or worse than the used benchmark market. Alpha identifies part of the return that was say, not caused by a general market trend.

A positive alpha means that a manager has outperformed the respective benchmark. The higher the alpha, the better the performance of the fund. But of course a positive alpha does not suggest that the respective fund generates a positive return, only that it performers better than the benchmarked index.

The concept of alpha emerged with the development of weighted index funds. Such index funds attempt to emulate the performance of a portfolio that incorporates the whole market, and implies that all positions are proportionally weighted. Alpha gave investors a tool to measure their portfolio managers’ performance more accurately by identifying the active return on their portfolio. This being said will reveal the skill of the manager.

This brings us to another important advantage of alpha. As we know, fund managers charge a management fee. If alpha is not bigger than the fee the manager charges, the investors therefore experiences a net loss. Even though We see a positive performance after subtracting the manager fees, it still does not necessarily mean that value was created for his investors.

Overall...

continue

Brexit Interrupts London as Fintech Hub

Posted by Ashton Du Plessis on

Brexit Interrupts London as Fintech Hub

A month ago, if I asked a fintech aficionado in Europe where the prime location to start a new company would be, the answer would have been clear - London. But entrepreneurs now have their heads spinning due to the Brexit fiasco.

Not only has London been Europe’s financial centre, it has also been attractive for fintech entrepreneurs establishing new ventures. This, due to enthusiastic government support, age tested banking systems and a sophisticated human workforce. In an article written by Reuters: Reuters - Uk - Britain - Eu - Fintech statistics show that out of 10 fintech organizations, 7 stated that moving their headquarters out of London has been their main topic of discussion. Eileen Burbidge, a partner at venture capital firm Passion Capital was recorded in the same article saying that there seems to be no contingency plan from the British government to re-instil their faith in the fintech sector. This statement should come as a shock to the British economy, as London’s start-ups showed earnings of $7billion in revenue, beating California and New York in the race for the world’s largest fintech hub.

But with the faith of fintech organizations and their investors in London decreasing, what other start-up city alternatives are there? With London dropping from the radar, we believe these five cities will be the next go-to locations for your successful start-up.

Berlin, Germany

I bet you didn’t know that some of the world...

continue

The Day After

Posted by Vladimir Sec on

After the referendum about Britain leaving the European Union, financial markets faced unexpected results. Although there were signs that the final counts would be quite close, most polls showed that the leading party is the one voting to remain. But unlike most of the experts and financial analysts anticipated, almost 52 percent of the British population wanted to leave the EU. This event was about to impact the markets in a way that the analysts could perhaps know a trend of, but it was not altogether clear what would really happen to financial markets afterwards. This ambiguity of expectations was present due to two reasons; firstly, no country has ever left the European Union before, and secondly, the actual agreements about what it really means for Britain to leave the EU was not yet arranged. One thing was sure, it would have, to some level, negative effect on the Sterling, on the UK stock market and pretty much on everything that is linked to the UK economy. If not for the fundamental reasons of real impacts of Brexit to Local and Global Economy, then at least short-term for the negative sentiment in the financial markets.

Immediate markets’ response

The UK sterling fell down by over 11 percent to US dollar and has yet not recovered from those levels. It dropped by 7,1% the very next day after the UK vote which was the largest one-day decline recorded, after 4,1% plunge in 1992 on Soros’s phenomenal bet against Sterling. But markets got volatile in general, UK’s FTSE...

continue

Hedge funds are complex, risky, non-transparent and illiquid?

Posted by Etienne Baume on

Confidence in hedge funds has suffered as a result of the financial crisis in 2008/09. A few hedge funds have taken on too much risk and have not survived the crisis.

Of course Madoff’s Ponzi scheme did not help the reputation of hedge funds, when he swindled thousands of shareholders out of $65 billion by paying early investors with the money from later investors.

As a result, many investors have written off hedge funds. It is often forgotten that some hedge funds have managed the financial crisis better than traditional investment funds.

Let’s look at some common misconceptions about hedge funds.

Complexity

While some hedge fund managers use complex instruments, the most popular strategy, long/short equity, uses the same types of securities as traditional funds such as shares and bonds. The only difference is that a long/short equity hedge fund not only buys securities that are believed to be undervalued, but also short-sells securities that seem overvalued. Taking a short position means that an investor simply borrows a security rather than buying it. The reason behind it is quite simple. If the security decreases in value, the investor can buy it back at a lower price, return the security to its owner and cash in the difference. This gives hedge funds the flexibility to profit from falling markets.

Risk

The additional toolset, which hedge fund managers use, can make a strategy more complex and harder to comprehend for traditional investors but it would be unfair...

continue

New pintxos de Ruby

Posted by Marek Stanczyk on

I think it doesn’t come surprising that Ruby is my favorite language. By now it’s past its most radical changes, which happened from version 1.8 to 1.9 (and they were intentionally done without changing the major version number, in order not to scare people from upgrading). Since version 2.0, the language became much more mature, but versions 2.1 through 2.3 still deliver useful improvements. I’m going to briefly show you a few of them.

Safe navigation operator

I find the existential operator accessor in CoffeeScript very useful:

if user?.organization?.investor

This improvement was now added to Ruby, however with a different syntax, because the question mark is allowed as last character of a method name.

if user&.organization&.investor
# instead of
if user && user.organization && user.organization.investor

Much better than a chain of nil checks or an if pyramid.

Array#dig and Hash#dig

Ever needed to get a value from a nested array or hash? Something like

array[0][1][2] if array[0] && array[0][1]
hash[:first][:second][:third] if hash[:first] && hash[:first][:second]

Ouch. Now we can simply dig it:

array.dig(0, 1, 2)
hash.dig(:first, :second, :third)

Cleaner, isn’t it?

Hash#to_proc

This one might not be needed every day (or every other day), but is still quite cool. An Enumerable can now be mapped through keys of a Hash:

prices = { apple: 1, banana: 2, celery: 3 }
%i[apple plum banana].map(&prices) # => [1, nil, 2]

Which leads me to one similar extension of my...

continue

What is a Hedge

Posted by Giorgio Polvara on

This is not your typical post on software development. We’re going to talk about hedge funds and investment strategies. If you are not sure what these are, check out my previous post: An Introduction to Hedge Funds for Developers

Imagine this scenario, you just got hired as a developer for a company that works for the edge funds industry. You know nothing about edge funds. Sure enough, you use cutting-edge technologies and think about edge cases.

Determined to do a great job, you start studying what this is all about. Not even thirty seconds into the quest and you realize your Italian brain doesn’t process the letter h.

Google search for edge funds

Of course, all characters appearing in this story are fictitious. Any resemblance to real persons, living or dead, is purely coincidental. And by that I mean that’s exactly what happened to me.

After learning how to spell hedge the next step was to learn what it means.

Hedging

If you invest you expose yourself to a certain amount of risk. When you bet some money on one investment there’s always a chance you’ll lose. If you try to reduce the risk of one investment by investing in a related position you are hedging.

The word hedge indicates a way of protecting, controlling, or limit something. In this case, you are protecting yourself from a possible bad investment. There are different ways to hedge, we’re going to see the long/short equity model.

When it comes to name the first hedge fund many state A. W. Jones as the father...

continue

Mongoid embedded collection drawbacks

Posted by Marek Stanczyk on

MongoDB embedded documents are a cool and useful concept, but often not completely natural for a person coming from SQL databases, like many of us. So when we discover embedding and its features, we might be tempted to try to solve all our problems with it.

Let me first mention some advantages of embedding:

As usual, there is the other side of the coin. Referenced collections provide more flexibility and allow better normalization, but my point is not to make design comparisons, but show you some practical drawbacks of embedding instead (on Mongoid 4).

Increased size of documents slows down the queries

Regardless how simple the query is, the retrieval of large documents from the database takes longer. Much longer (this query matches 4 documents with ~ 1300 embedded positions each):

# complete documents
[1] pry(main)> Benchmark.measure { Portfolio.where(name: name).entries }.real
=> 4.782978
# just the ids
[2] pry(main)> Benchmark.measure { Portfolio.where(name: name).pluck(:id) }.real
=> 0.010231
# without positions
[3] pry(main)> Benchmark.measure { Portfolio.where(name: name).without(:positions).entries
continue

Leave a Trail

Posted by Giorgio Polvara on

I know I’m gonna be repetitive, but once again I’m going to mention Douglas Crockford in one of my posts. I just can’t help it because he’s so good. The insight he gave me this time:

Try to learn as many programming languages as you can. Each new language will make you a better developer.

So, let me tell you how the last weekend I became a better developer by a 0.0001%.

First, I’m going to share a secret with you: Fundbase is moving to React. Yes, after 3+ years with AngularJS we finally decided to switch. The reasons are various and will maybe be covered in a future post. For now, I would like to talk about something else.

Right on its homepage, React tells you that the library is just the V in MVC. This means that when you want to build something as complex as Fundbase, you need some other tools to assist you.

Sure enough, you can just take a MVC framework and put React in the middle of it. But the great majority of React developers are doing things differently. A short time after open sourcing React, Facebook released Flux. Flux is an architecture that substitutes MVC. It’s basically a design pattern with a very small implementation (the official script is just 367 lines).

Flux’s ideas are so powerful and the code so small that people started implementing their own versions, adding changes and improvements. Among the various forks Redux by Dan Abramov is becoming the go-to implementation. In case you were wondering, yes, the new Fundbase is going to use Redux.

continue

Making an Array Quack Like a Duck

Posted by Marek Stanczyk on

We have this large, complicated blackbox module that calculates various performances of funds (monthly, yearly, since inception, annualized, etc.). It gets the data (prices) from the database as it needs, depending on what we ask it to calculate. When developing something completely different, I found myself in the need to calculate same kind of performances, but for a different model, which is similar enough in nature to make it pretend it’s the other model. Except that the base data needed for the calculations are not prices stored in the database, but an in-memory Array of price-like objects…

Now what? We could discuss whether our object model is correct, whether these models should belong to a common hierarchy, or other ideological questions. But let’s take a look at it from a different angle… We have Ruby with all its dynamic features, so how about we pretend our Array actually is a Mongoid queryable collection.

Let’s say our price objects have value and date attributes, and the module runs queries which look like

returns
  .where(:date.gte => start_date, :date.lt => end_date)
  .order_by(:date.desc)

and we want it to work on an Array. We don’t need to support all possible query options (yet… :-)), just those that our module needs. And what exactly is that? where is like an Array#select, and order_by is like #sort, right?

Let’s wrap this array-querying functionality in a new module which can be plugged into arrays as a class extension:

module ArrayQueries
  def where
continue

4 Tips For Speeding Up Your Rails Feature Test Suite

Posted by Tim Blonski on

At Fundbase, we are adamant about writing tests, as I hope you are :) This includes unit and end-to-end (feature) tests. Having high test coverage is something we constantly strive for and monitor; and it’s certainly something we hang our hats on as the benefits to the company are huge. However, it can have an unfortunate side effect for development - slowness. As our test suite has grown, specifically our feature tests, our build time has increased as well. This results in three main pain points: 1. Feature branch builds take long to run the suite 2. Deployments are slower (due to point 1) 3. It becomes more painful to work with the specs and developer happiness decreases

In this post, I’m going to highlight 4 techniques I used to cut our test suite build time in half.

We use Capybara with page objects to run our feature specs and CircleCI for continous integration and deployment.

Be sure to benchmark the speed of all specs in your suite and sort them by run time to have a starting point for what specs to focus on and a metric to return to.

1. Remove slow finders

This is both a symptom of a slow spec and overall slow suite. There is a great post by @ngauthier in which he recommends his slow finders gem to hunt these down. In a nut shell, it boils down to avoiding assertions like this:

def has_ok_button?
  has_css?('.ok-button')
end

context 'when the button is displayed' do
  it 'has the ok button' do
    expect(has_ok_button?).to be true
  end
end

context 'when the...
continue

Rails & Mongoid Data Loading Optimizations - Reducing Database Payload

Posted by Marek Stanczyk on

In my previous post, I demonstrated how can you reduce the query count to make a request faster. While that’s a nice thing to do, I ran into an interesting case recently, and I’ll share my solution with you.

The scenario was that I had a list of items sorted by a non-trivial condition, which was not possible to do in a query, but had to be done in Ruby. All documents from the collection were retrieved from the database, sorted, and paginated. The problem was that the documents are rather large, and the query to load them all took long (a few seconds). This revealed a fact that having a small number of queries is not always enough.

Thinking about it, I remembered that using only can make quite a difference in the query time, but I still needed the whole documents. So I tried the following approach:

items = Model.all.only(:id, :name).entries
items.sort! { |a, b| some_custom_condition }
items = items[page_number * page_size, page_size]
items = Model.any_in(id: items.map(&:id))
items.sort! { |a, b| some_custom_condition }

So I actually ran an extra query, but the amount of data fetched from the database was decreased substantially. In my case, the request time dropped from about 7 seconds to 1.5 seconds!

Also, I was told that a good blog post should contain a picture of...

continue

JavaScript Function Composition

Posted by Giorgio Polvara on

Around seven years ago (gosh I’m getting old), I started to work on my first serious single page application. I was the only frontend developer. A friend of mine was working on the backend. Before that, I worked only on small jQuery snippets. Things like “make this button disappear when I click on it”. I didn’t study JavaScript, I didn’t feel the need to. After all, I knew Java.

It goes without saying, the project was a mess. A real example of spaghetti code. It was so complicated to understand what was going on that I had to create a set and a get method. They were two sync AJAX calls that were saving a variable in $_SESSION and getting it back. All because I couldn’t figure out a way to access values from different sections of my codebase.

After this terrible experience, I realized JavaScript might not be just a light version of Java. I started googling for some good material for a beginner like me. Almost everyone’s advice was to read “Javascript: The Good Parts”. The author, Douglas Crockford, remained ever since a guru for me. He often says:

If a feature is sometimes useful and sometimes dangerous, and if there is a better option then, always use the better option.

You can see this motto applied to his code, his style is unambiguous and easy to follow, although it may appear verbose.

What does this have to do with function composition you might ask. Fast forward to one year ago. I saw this talk from Douglas about “The Better Parts”.

With ES6 coming he decided...

continue

Automating Daily Standup

Posted by Tim Blonski on

As I’ve mentioned many times before, we live, breathe, and eat automation at Fundbase. You can find examples of this everywhere in our workflows and even in our day to day job responsibilites. This holds true not just for our developers but all members of our team; it is a deeply ingrained and integral part of our culture.

Daily standup is a given on any modern team and its benefits are well documented. However, it is at high risk for becoming stagnant and team members can lose sight of it purpose. This leads to a montonous, ineffective part of everyone’s day in which we simply go through the motions.

I have touched upon the power of Hipchat (or Slack, etc) integrations in your daily workflow, as have many other awesome engineering organizations. At this point, one might even say that chat client integrations with Github (i.e. webhooks) are almost as standard as a daily standup.

In this post, I’m going to discuss a less common type of chat client integration, but one that is arguably the most powerful integration we have at Fundbase; automated daily standup.

One of our developers is ‘On Duty’ each day of the week; on any given day, the on duty dev is in charge of running standup which starts a 10am.

Daily Standup

If you’re not familiar with chat clients, Funbot is just a Node app which we can customize with our own scripts or by adding existing npm modules.

In our custom standup script (which we hope to release as an open source npm module someday), we basically just set some listeners...

continue

Rails & Mongoid Data Loading Optimizations

Posted by Marek Stanczyk on

In this post, I’ll write about how the need for optimizing a backend response slowly sneaks into our application as it grows, and how we can tackle this situation from the point of view of loading data from the database. It’s based on Rails with Mongoid, but some ideas are valid for ActiveRecord too.

Happy beginnings

Usually we start with an application that has a few models, controllers and pages that operate on those models (CRUD, more or less). The controllers have simple actions which look like they were copied from a Rails guide (or Rails generated), and tidy templates that render our nicely structured data (where a single each loop is the most complicated piece of code). And life is good.

Getting bigger

Our application is growing. We have more models which in turn have more relations. Some of the relations are becoming more complicated, e.g. polymorphic. The pages are displaying more aggregated data (e.g. dashboards and such) and quietly become slower. Initially, we prefer not to notice it, while the request takes at most a second or two, it’s kind of ok. At 5 seconds, we’re getting slightly nervous, and 10 seconds or more is no longer acceptable. Even worse if that’s just one of the requests from a frontend application, such as Fundbase. And thus comes the time to optimize. I won’t touch approaches such as splitting to more requests, caching, database indexing, etc., but will take a look at how to make it faster without changing the request or response.

Diving into...

continue

Weekly Deploy Notes

Posted by Tim Blonski on

In my previous post, I detailed how we automated the process of communicating what code was deployed while also improving transparency by sending out Daily Deploy Notes after each deploy to production. Now, I’ll detail a similar feature that further improves upon the visibilty that everyone in the company has to application improvements and even key business statistics.

Summarizing production code changes on a daily basis is very useful and almost essential when practicing continuous deployment. But it can be a bit too granular when trying to get a higher level view of what was deployed over a certain time period. We decided it would be useful to have a summary of what was deployed on a weekly basis; and thus, the This week in Fundbase (TWIF) weekly email was born. It would start as a tool to summarize deployed code, but evolve to include any important data points we deem useful.

In it’s first iteration, the TWIF email summarized deployed code in the same format as the Daily Deploy Notes: Weekly Deploy Notes

How it works is we query the Githup API to return all closed PRs to master:

# @returns the last 30 PRs.
# Ordered by created_at desc.
def merged_pulls
  url =
    'https://api.github.com/repos/Fundbase/fundbase/pulls?'\
    'state=closed&base=master'
  resp = Net::HTTP.get_response(URI.parse(url))
  JSON.parse(resp.body)
end

We then iterate PRs to retrieve all that were deployed within the week:

def merged_pulls_this_week
  merged_pulls.each_with_object([]) do |task, arr|
    merged_at...
continue

Mind the Gap when upgrading to HTTP/2

Posted by Giorgio Polvara on

The web has been in great ferment in the last few years. HTML 5, ECMAScript 2015 and all the new landing features are making our beloved platform a great place to be.

One of the most significant improvements is HTTP/2.

The Hypertext Transfer Protocol evolved a lot since its beginnings in 1989. When Tim Berners-Lee and his team created the protocol, they needed only a few features.

This first version was simple: it allowed only to perform GET requests and receive HTML data. Over the years, the HTTP WG documented and updated the protocol bringing it to version 1.1.

Although most of the web runs on HTTP/1.1, this version has many issues. Updating a protocol, especially if highly adopted, is not an easy task. For this reason, developers had to create workarounds to many problems.

If you are a web developer you know most of them and chances are you’re using them in your projects.

All those best practices are helpful but become counterproductive when used alongside with HTTP/2. Let’s analyze them and see why is this the case.

Domain Sharding

When we start an HTTP/1.x request, a new TCP connection is created. Once the request ends, we can reutilize the connection so we don’t have to create a new one.

This mechanism was serving us well during the early web but, with the time, we outgrew it. A web page is no longer one single HTML file; we require CSS, JavaScript and images.

For this reason, browsers started handling a connection pool of TCP streams. Modern browsers usually...

continue

For the (Heart) of Developers, Pipedrive, Hipchat and Our Daily Sales Standup

Posted by Jan Walkiewicz on

I never had the pleasure of working with computer geeks prior to Fundbase. Now, two years in, I have to confess that I am utterly impressed with how they function and approach everyday obstacles. Being a “geek” is not an insulting term in my dictionary anymore. Developers combine an “eliminate repetition” mindset with superior technical ability. Their capabilities can be applied to most, real-world situations and I am more than confident that computer science will be a mandatory subject in every school one day. Tedious manual work, doing the same thing over and over and maintaining vast excel spreadsheets is something no human being should have to do, ever.

Our development team uses HipChat integrations to make their everyday working lives easier. Each and every task that was manual, repetitive or simply not centralized is now done through HipChat add-ons. They use it to monitor the entire development workflow, deploy process, ticket overview and many other aspects I, quite frankly, cannot comprehend. On top of that, it is fully synced with JIRA, CircleCI and GitHub. Even their daily standup meeting is fully automated.

Knowing how developers work, why not replicate their standup, integrate it with our sales software and adjust it to the specific needs of our team?

Pipedrive

We use Pipedrive to track all of our sales deals. It’s a simple yet powerful, user-friendly, Sales CRM software out of Estonia (birthplace of Skype, Transferwise and many other startups). We have customized...

continue

Daily Deploy Notes

Posted by Tim Blonski on

In my last post, I detailed how our deploy process is integrated with Hipchat. One of the key benefits of this integration is the visibility that it gives to all members of the team; everyone in the company (from development to operations to sales) has visibility into changes that are being pushed into production.

But we can take this a step further. There are some members of the team who don’t spend much time in Hipchat and still need visibility as to what functionality is being pushed to production. And there are various other reasons why someone could miss notifications in the Development room that a deploy occurred.

In this post, I’m going to detail a few of the creative ways the we communicate out deploy summaries to the entire team in pursuit of the highest level of visibility possible as it pertains to production deploys. Moreover, this is another example of how we put one of our core Fundbase cultural beliefs into practice - automation.

Similar to our now completely automated Standup (to be detailed in a future post and perhaps our best example of us putting automation into action), at one time, our CTO would manually communicate out what code was deployed at the end of each day via an email with the subject: Daily Deploy Notes. What I mean by deployed code is tasks relating to specific tickets. This could be bug, regression issue, improvement, new feature, etc that is tied to a specific JIRA ticket. This means that we would have to look back through the PR descriptions...

continue

Deploy Process Integration with Hipchat

Posted by Tim Blonski on

At Fundbase, we love Hipchat as our internal messaging tool. But it can be so much more than a tool for communication. In this post, we’ll walk through how we integrate Hipchat into our development workflow and deploy process to ensure that everyone in the company (from development to operations to sales) has visibility into changes that are being pushed into production.

Deploy Environments

We have an integration (staging) and master (production) branch, with each branch being deployed to it’s own cluster. New code is always based off the integration branch and its server is only accessible to FB staff. When integration is in a production-ready state, we deploy to master which is our stable release branch and contains only production-ready code.

Using this workflow, our dev team is able to deploy to production multiple times per day.

Deployment

We start by checking the state of integration:

@funbot deploy status

clear deploy

If green, we are cleared to merge, so we prepare the PR to master:

@funbot deploy prepare

deploy-prepare

The developer and PM must sign off on each task to be deployed. When all boxes are checked:

@funbot merge #1935

merge-to-prod

Upon success, the room is notified:

successful-deploy-msg

If merging to integration, the PR was approved by the reviewing dev and we only need to tell Funbot to merge the PR number.

Or notify the room of failure:

failed-deploy-msg

Deploy Guards

We guard against unapproved merges in two ways:

1 - If a feature is not cleared for deploy (it is not production ready because it has not been...

continue

Programming Is Hard

Posted by Giorgio Polvara on

A friend of mine says that we developers don’t know how to write programs. He claims we make a pentacle using wood grouse’s blood, put a computer in the middle and pray the gods of IT make it work.

His insight of the development process always made me laugh. Of course he’s exaggerating—any person, with a little bit of time, could learn to program with no problems. Or could he?

The Sales Standup

Meet a colleague of mine, Jan. Jan works for our sales team, speaks fluent English, and is a pretty smart guy. He also likes himself and, knowing he’s going to read this post, I’m not going to make any more positive remarks about him.

Jan cloned our main repository on his machine to run the Rails console so he can export data into CSV files. Consequently, he knows a tiny bit of Ruby and ActiveRecord—although he probably doesn’t know what they are called.

Everyday, each Fundbase team has a daily standup. The difference between sellers and we developers is that we have an automated standup. We ask our chat bot to run the meeting so it goes trough each ticket, asks the developer for an update and writes the answer as a comment in the ticket’s Jira page.

The sales team has an hour long Skype call.

After one of the people attending the call passed out because he could no longer bear the boredom, my boss asked me to help Jan create an automated sales standup just like ours.

Because I’m a great employee—and I had no other choice—I gracefully accepted.

Let’s Code

The deal was that...

continue

ES6 Tail Call Optimization

Posted by Giorgio Polvara on

ECMAScript 6 a.k.a. ECMAScript 2015 a.k.a. the new version of JavaScript is getting closer and closer to ratification, the current goal is to have the new standard ready in June 2015. This is a big step forward for JavaScript that is becoming a modern language, suitable for all the uses we need.

If you follow tech news you know about some of these changes: classes, modules, spread operators… In this post I will analyze one less known feature: tail call optimization.

CS 101: The Stack Frame

Let’s analyze this simple snippet of code:

function foo() {
  console.log('foo');
  bar();
  console.log('bar called');
}

function bar() {
  console.log('bar');
  baz();
  console.log('baz called');
}

function baz() {
  console.log('baz');
  console.log('all done');
}

foo();

When we invoke foo, a new stack frame is created in memory. A stack frame is simply a portion of memory where we store some values necessary to execute the function, for instance local variables, arguments and most importantly the caller of the function, so when the execution is done the callee can return to it.

Let’s see this in action using Chrome’s debugger:

First stack frame

In the orange rectangle, you have the stack frame and also a list of local variables. It’s not exciting but let’s see what happens when we call foo:

foo gets called

A new stack frame gets created. Notice that the other frame is still there, we will need it later. After foo calls bar that calls baz, we are in this situation:

baz gets called

Two new stacks are created, one for...

continue

4 Steps to a Blog System

Posted by Tim Blonski on

  1. Choose a blogging engine
    We chose between Jeckyll and Middleman. There are a plethora of options available, and it’s important to choose what best suits your needs. We narrowed our final decision down between Middleman and Jekyll (both great) and ultimately chose to go with Middleman. Some key reasons:

    • It uses something very similar to the Rails asset pipeline so we wouldn’t have to use liquid templates (we use .erb)
    • It is easy to deploy (also because it is similar to Rails)
  2. Choose your layout and font
    The developers who built this blog are not designers (or even very good developers), so take this section with a grain of salt. Layout, font, header, and footer are basically the only design elements to focus on. Anything else is probably overkill. The design should reflect your brand and values; when in doubt, keep it simple. Great examples can be found at Basecamp blog and Thoughtbot blog.

  3. Choose a name, host, establish a DNS and deploy process flow
    We host on Github Pages as it is super simple to host right from our Github repo for the blog. You should choose a name for your blog; not ‘blog.yourcompanyname.com’. Ideally, it should come from some shared experience. At Fundbase, we measure our success by the size of our (invisible) yacht. As far as deploy process, we keep it as simple as possible so it can be followed by technical and non-technical folks alike and easily articulated on the README. The process for publishing a post is much like the process for developing...

continue

An Introduction to Hedge Funds for Developers

Posted by Giorgio Polvara on

When I joined Fundbase in 2013, I had no clue what a hedge fund was. As a developer, all I care about is programming languages, design patterns, and the new cool JS framework that came out two minutes ago. All this financial jargon has little or no interest to me, right? WRONG!

The first step in solving a problem is to understand it. Otherwise, you’re just a monkey coder. You can’t add anything to the project besides writing code that someone else planned.

The only way to escape this is to study.

The cool thing about our job is that we serve other industries and we learn from them.

I found it quite hard to understand hedge funds since I didn’t have any financial background. Even Hedge Funds for Dummies was too complicated for me and many resources out there are trying to help you invest in hedge funds rather than simply explain how they work. This document is the guide I needed two years ago and couldn’t find. I hope this can help others, maybe even future Fundbasers.

What is an Investment Fund?

Before explaining what a hedge fund is, there are some concepts we need to cover, starting with: “what a fund is”. The Cambridge Dictionary has a good definition for it:

fund /fʌnd/
noun – an amount of money saved, collected, or provided for a particular purpose:
a pension/trust fund
The hospital has set up a special fund to buy new equipment.
Contributions are being sought for the disaster fund.

Think about the birthday fund you have in the office: money is collected, saved...

continue