18 year olds put a man on the Moon Jul 02, 2016

The average age of the systems engineers and controllers in the room that day was 26. Which means among other things that their age when they heard that challenge [going to the moon] was 18.

I found this gold nugget while researching Thorium reactors, more on that some other time. Everything about the Apollo mission’s is awe-inspiring, but this one struck home with me particularly well.

The time for change is now, age or pre-existing knowledge and training is not a requirement for participating. Go make the world a better place.

The war on stupid people Jun 26, 2016

The Atlantic - The War on Stupid People

it seems safe to say that no more than one in three American high-school students is capable of hitting the College Board’s benchmark. Quibble with the details all you want, but there’s no escaping the conclusion that most Americans aren’t smart enough to do something we are told is an essential step toward succeeding in our new, brain-centric economy—namely, get through four years of college with moderately good grades.

That leaves us with early education, which, when done right—and for poor children, it rarely is—seems to largely overcome whatever cognitive and emotional deficits poverty and other environmental circumstances impart in the first years of life (3 or earlier). … while the results haven’t proved that students get a lasting IQ boost in the absence of enriched education in the years after preschool, measures of virtually every desirable outcome typically correlated with high IQ remain elevated for years and even decades—including better school grades, higher achievement-test scores, higher income, crime avoidance, and better health.

Wenderoverproductions Jun 24, 2016

Youtube scoope of the week Wendoverproductions!

Favorite podcasts Jun 20, 2016

I love podcasts it’s simply a great medium for story telling and building a relationship with your audience or visa versa. Furthermore they’re easy to consume while doing other tasks. Here’s the my favourite podcasts:

Story Telling

99% Invisible

My favorite show of all time. It’s used to be more focused on architecture, now more broadly about stories that include design in some way. I was introduced to it through this amazing episode about the Citigroup Center in NY and how it for years was in danger of collapse without anyone knowing until an architecture student thought to double check the structural calculations.

Surprisingly Awesome

The premise is to take a seemingly boring subject and present something “surprisingly interesting” about it. Anything from Gimlet is probably worth a listen. Best episode so far is Free Throws it among other things unravel the fact that some basket players choose to throw free throws eyes closed to hit the basket!

Reply All

A show about the internet at large. Some great stories among the many episodes already. DMV Nation, Hack the Police, The Man in the FBI Hat.

Tech

Exponent

Ben Thompson and James Allworth deconstruct the business forces at work in whatever is shaking up the tech sector this week. Some of the best business analysis you will find.

a16c

Interviews with various people in the tech sector around a new topic every week. Blockchain, AI, Politics Over Pragmatism — On China, Trump, and Smart Guns?, etc.

Accidental Tech Podcast

Podcast covering Apple.

Life

Tim Ferriss Podcast

Lot’s of people roll their eyes when you try and explain Tim Ferriss. But he quite uniquely manages to combine physical health, business, tech and story telling in to something I find amazing.

Some episodes that stick out to me: Walter O’Brien > Born in Ireland, Walter was diagnosed as a child prodigy with an IQ of 197. He became an Irish national coding champion and competed in the Olympics in informatics.

Fast forward to today, he and Scorpion get paid to fix every imaginable problem for billionaires, startups, governments, Fortune 500 companies, and people like you and me. On the large side, it ranges from mitigating risk on $1.9 trillion of investments to inventing artificial intelligence engines to protect United States war fighters in Afghanistan.

The World’s Most Famous Performance-Enhancement Chemist

Patrick Arnold, widely considered “the father of prohormones,” is an organic chemist known for introducing androstenedione (remember Mark McGwire?), 1-Androstenediol (marketed as “1-AD”), and methylhexanamine into the dietary supplement market.

Super interesting to hear about how chemists think about making drugs. It’s considerably more like coding than I would have imagined.

Sam Harris, PhD on Spirituality, Neuroscience, Meditation, and More

Sam Harris is a neuroscience Ph.D. and the author of the bestselling books, The End of Faith, The Moral Landscape, Free Will, Lying, and Waking Up.

In this episode, we explore the science of lying, uses and types of meditation, psychedelic drug uses and risks, spiritual experiences, and more. It’s really a discussion of the human experience, and how to optimize it without harming others.

Reframing Entrepreneurial Success Jun 15, 2016
Your time is more valuable than investor money Jun 09, 2016

Discussing wether to stay at a startup – great insight!

I need a higher level of certainty than investors do because my time is more valuable to me than their money is to them. Investors place bets in a portfolio of companies, but I only have one life.

Why I turned down $500K, Pissed off my investors, and Shut down my startup

Codebar.io Jun 05, 2016

I recently discovered Codebar.io. Developers like my self come and teach people how to code for free. I actually tried to start something like this my self back in Copenhagen a long time ago, but there simply isn’t enough demand and supply. It’s entirely the opposite story here in London. The events are oversubscribed sometimes by a factor of two even on the supply side. It’s truely crazy.

I’ve been to 3 event and we even hosted one here at DueDil. It’s been interesting so far to explore why people are learning and sometimes see it click for them for the first time. You should come along to the next one.

The DNA Journey Jun 03, 2016

Surprisingly insightful promotional video for the danish company momondo .

This should be compulsory. There would be no such thing as extremism in the world if people knew their heritage like that. Who would be stupid enough to think of such thing as pure race.

Architecture gems from the archive Apr 13, 2016

I’ve was reading Architecture of Happiness by Alain Botton last week. Interesting book for sure, it caused me to loose my self in architecture for a bit today. I’m a design buff, can’t help my self. I somehow managed to find this gem of an old television show on youtube. They have hours of stories on interesting buildings and some not so interesting.

Worth a watch, look at their body of work.

Meditation and Consciousness Mar 25, 2016

I’ve been aware of the benefits of meditation for years, but never really got it to be part of my daily routine.

I’ve however made some inroads and been able to do it everyday for two weeks now. I don’t write to report of profound changes to my life. But I have been feeling great! I’ve uncharacteristically been getting up early and refreshed.

More interestingly I’ve been thinking and reading about meditation and the concept of consciousness.

Two great resources popped up:

  1. A talk from David Lynch about consciousness:

See the full talk here.

  1. From perhaps my favourite blog waitbutwhy.com a long post about consciousness. If you know anything about waitbutwhy you will know this post is too long and too good to meaningfully summarise. It’s not a self help post, but a meta post setting the concept of consciousness in connection to mediation in context.

Read the post you won’t regret it, and then subscribe to his posts, you can thanks me later.

Slack, leave me alone Mar 12, 2016

People love slack! It’s pretty freaking great! But can we all just get back to work and stop being part of every conversation?

Yes I’m being a grumpy old man, but I see so many people spend considerable amount of time on slack. To put it in context, there’s a reason why every meeting is not a company wide meeting. Not everyone needs to know about everything, it’s simply not the most productive way to spend out time.

Anyways many people have talked about this in the past. Not much for me to add. The best post I’ve read about it is “Is group chat making you sweat?” by Jason Fried.

The Eight Levels of Programmers Mar 04, 2016

My favourite coding related blog is and have for a long time been codinghorror.com. I recently stumbled upon one of his old posts “The Eight Levels of Programmers”.

This post is simple, yet managed to make something tick for me. I love programming and I love creating and running businesses. I’ve been incredibly lucky to live in a time and place where doing both at once is both possible and valuable. But it creates an internal struggle, which skill set should you focus on developing?

The simple descriptions of “Dead- and Successful Programmers” made it clear that I don’t identify with that vision. I could see my self starting a business like that of Basecamp, but I’m probably not gonna write the next equivalent of rails.

I’m a “Working Programmer” and I love engineering, but interestingly enough what clicked for me is the “Average Programmer”.

Average Programmer At this level you are a good enough programmer to realize that you’re not a great programmer. And you might never be.

Talent often has little do do with success. You can be very successful if you have business and people skills.

I freaking love programming, however my differentiator is not that I will go on to release white papers for Goolge. It’s the fact that I’m equally in love with product development and business. For me optimising for using my business skills over pure engineering is the right way to go.

That being said, I just spent two years building a business and I think I will mostly spend the next two focusing solely on engineering.

I recommend to everyone to think about the industry you work in on a regular basis and reevaluate your assumptions about where you fit in.

The Wrong Abstraction Feb 25, 2016

In my last post I mentioned the cost of prematurely making an abstraction. To follow up on that here’s another great post on the subject. Sandi Metz is just great btw!

The Wrong Abstraction- Sandimetz.com

Duplication is far cheaper than the wrong abstraction

At the core of the talk and the post is the concept of “the sunk cost fallacy”. Developers don’t like to make new files, if it’s possible to modify something or reuse a preexisting class that’s probably what they’re going to do. So whenever you make an abstraction too early you’re leading yourself and future developers down the wrong path, because they will run with what you put in place.

Tolerate a little duplication and wait for the right abstraction.

Obviously the other side of the coin is to learn to realize when you’re decisions are being driven by the “sunk cost fallacy”.

The moral of this story? Don’t get trapped by the sunk cost fallacy. If you find yourself passing parameters and adding conditional paths through shared code, the abstraction is incorrect. It may have been right to begin with, but that day has passed. Once an abstraction is proved wrong the best strategy is to re-introduce duplication and let it show you what’s right.

Write code that is easy to delete, not easy to extend. Feb 15, 2016

Programming is terrible is one of my favourite blogs about engineering. Tef is obviously well read and a seasoned developer. I love going down the rabbit whole of papers his writing references.

He recently released a post that resonated well with me. Especially the sentiment that you shouldn’t get locked down to an abstraction prematurely.

Write code that is easy to delete, not easy to extend.

Becoming a professional software developer is accumulating a back-catalogue of regrets and mistakes. You learn nothing from success. It is not that you know what good code looks like, but the scars of bad code are fresh in your mind.

Perhaps I’m biased by being self taught, but I’m in 100% agreement. It’s two fold:

  1. Reading a book never compare to past experience when it comes to preemptively steering your self around potential pitfalls. When you start out, you should focus on churning out as many projects as possible.
  2. You learn nothing from success is true in most meaningful endeavours in life.

My point today is that, if we wish to count lines of code, we should not regard them as “lines produced” but as “lines spent” EWD 1036

I love this!

High five! Feb 10, 2016

Interesting essay about Awesomeness as a cultural phenomenon over at aeon.co.

It wanders quite far but I found two sections in particular interesting.

On politicians:

Political leaders are often called out as ‘sucky’ – a fact that the US comedian George Carlin noted in his book Napalm and Silly Putty as early as 2001:

Everybody says [politicians] suck. Well, where do people think these politicians come from? They don’t fall out of the sky. They don’t pass through a membrane from another reality. They come from American parents and American families, American homes, American schools, American churches, American businesses and American universities, and they are elected by American citizens. This is the best we can do folks. This is what we have to offer. It’s what our system produces: garbage in, garbage out. If you have selfish, ignorant citizens, you’re going to get selfish, ignorant leaders. Term limits ain’t going to do any good; you’re just going to end up with a brand new bunch of selfish, ignorant Americans. So, maybe, maybe, maybe, it’s not the politicians who suck. Maybe something else sucks around here… like, the public. Yeah, the public sucks. There’s a nice campaign slogan for somebody: ‘The Public Sucks. Fuck Hope.’

On high fives:

The person widely credited with inventing the high-five is Glenn Burke (1952-1995) – an African-American baseball player and gay trailblazer. [The high five was invented on 2 October 1977 at Dodger Stadium.]

Why, in the entire history of human life, should awesomeness be such a prominent concern now? If the question doesn’t grip you, consider the astonishing fact suggested by the story of Glenn Burke above: it took our species, Homo sapiens, until the 1970s to invent the high-five. I find that almost unbelievable. Thousands of years, nearly the entire history of human interaction, of human strife and struggle – a history of hardship and celebration, love and friendship, family and community, serious challenge and soaring triumph – and no high-fives. Vigorous handshakes? Of course. Parades? Glorious ones. Pats on the back? Time and again. Hugs and kisses? So many. But no high-fives.

The evolution of Databases for web apps Jan 19, 2016

MemSQL has a great article about the evolution of databases through the times. I could try and summaries, but the original article is so well written and funny that I could never do it justice.

Load Balancing Solves Everything

Replication Soves Everything!

Eventually, database replication became reasonable and we salved our consciences by adding a hot spare database. We then told ourselves there were no longer any single points of failure. It was even true — for a few minutes.

NoSQL Solves Everything > The problem with sharding a relational database by hand is that you no longer have a relational database. The API that orchestrates the sharding has in effect become your query language.

This was the point at which a lot of people took a deep breath, catalogued all the limitations and warts of their chosen implementation of SQL … and for some reason decided to blame SQL. A flood of hipster NoSQL appeared. They offered automatic sharding, flexible schemas, some replication… and not much else at first. But it was less painful than writing it yourself.

You know things are really desperate when “less painful than writing it yourself” is the main selling point.

Elasticsearch Resources Jan 05, 2016

For an upcoming side project the core feature is search. For this reason I was thinking about searching today. I’ve played a little with ElasticSearch in the past, but haven’t really gotten my hands dirty with it.

I knew that I needed to search geospatially, which I’ve done in the past using PostGis and PostGreSQL. I wondered if ElasticSearch could search geospatial data — it does, quite well in fact!

Here’s some resource on ElasticSearch I found useful:

Talk

Articles

Packages

One Way Data Binding in 10 Lines Dec 20, 2015

The frontend world is full of plugins and frameworks. It can be easy to jump the gun and include dependencies even for solving simple problems. There are loads of frameworks with one and two way data binding, and it’s a really empowering concept.

But adding these dependencies is sometimes overkill, and at it’s core it’s only a couple of lines of javascript.

See the Pen One Way Binding 10 lines by Andreas Heiberg (@AndreasHeiberg) on CodePen.

Low level JavaScript Dec 07, 2015

At UpDownLeftRight I’ve been putting together a demo that speaks with our hardware prototype. As crazy as it sounds I’ve been using JavaScript to do this.

When creating a demo speed of creating is the most important factor. We needed it to work on an iPad and already had some of the JavaScript code written, so choosing PhoneGap was a no brainer.

I’ve used it in the past and although I wouldn’t recommend it for most applications, it certainly is great for creating prototypes and demos.

Reading byte streams

Our hardware has a lot of information about movement and gestures that it needs to send over the wire. To do this efficiently it sends a stream of 8 bit integers that can be transformed into the original dataset.

Doing these transformations was my first practical project working with binary, bits and bytes, so it’s been fun wrapping my head around it.

JavaScript doesn’t really handle the stream too well:

console.log(steam)
// ""

In order to read it you have to convert it in to an array of bytes:

var bytes = new Uint8Array(stream);
// [255, 0, 64, 47, 180 .. ]

You can then convert your bytes in to binary, bits, hexadecimal, decimal or floats. All of the representations have their uses and how to convert from one to the other is not exactly obvious.

To understand how the conversions work you can use these online tools.

I’ve also created a JavaScript plugin to help you.

Upper and Lower nibbles

Sometimes the original data is longer than 8 bits. To encode this data it is split into multiple parts — nibbles. 8 bits can store integers 0 to 255. So lets say we wanna encode 500 low level this is what we do.

500 in binary is 0000000111110100 read form the right, that is 16 bits. So we would split it in two nibbles 00000001 (upper) and 11110100 (lower).

In our Uint8Array these would show up as their byte values [1, 244]. In order to read this as the full 16 bit we have two options:

  1. Convert to hexadecimal, concatenate and convert to decimal.
  2. Convert to binary, concatenate and convert to decimal.

1. Convert to hexadecimal

var upper = ConvertBase.byte2hex(1); // 1
var lower = ConvertBase.byte2hex(244); // F4

var hex = upper + lower // 1FA
var dec = ConvertBase.hex2dec(hex); // 500

2. Convert to binary

var upper = ConvertBase.byte2bin(1); // 00000001
var lower = ConvertBase.byte2bin(244); // 11110100

var binary = upper + lower // 0000000111110100
var dec = ConvertBase.bin2dec(binary); // 500

Converting from ints to floats

What happens if the source data is a float? There are a couple of ways to store floats as ints. On our particular hardware a float is converted to an int by multiplying with a sufficiently large number and rounding the result.

The number that is used to multiply stays constant and to convert the resulting ints underlaying float value we need to know that constant. To get the float value we divide the int with the constant, which is why we call it the fraction. Our fractions follow a pattern and can be referred to as fraction 1, 2, 3, etc. Fractions are simply 1 in binary right shifted by the fraction number.

Fraction Binary Decimal
1 00000010 2
2 00000100 4
3 00001000 8
4 00010000 16
5 00100000 32
... ... ...

Let’s say a float is encoded with fraction 14 into a 16 bit signed integer. To decode it we would right shift 1 by 14 and divide our int with the result:

var integer = 26624;
var fraction = 1 << 14; // 16384

var float = integer / fraction; // 1.625

A signed 16 bit int can only store -32767 to 32767. Given that we’re using fraction 16384 we can easily calculate the bounds of the floats we can store.

var floatBound = 32767 / fraction; // 1.999938965

Meaning we can store floats from -1.99 to 1.99.

In my gist you will find signedIntToFloat(num, fraction) and unsignedIntToFloat(num, fraction) to help you with these conversions.

Converting from unsigned to signed

Most of our output is unsigned ints, but in some cases we need to convert from unsigned to signed. Here’s the solution from my gist.

unsignedToSignedInt: function(number) {
    // if the number is desired as a float from an int with a binary point
    // convert the unsigned int to a float with the binary point at the {fraction} bit

    // convert from unsigned int to signed
    var b = new ArrayBuffer(2);
    var u = new Uint16Array(b);
    var i = new Int16Array(b);

    u[0] = number;
    var signedNumber = i[0];

    return signedNumber;
}

Bitwise operations

I’m far from confident working with on a bit level, so for me I much prefer to convert to integers and floats as soon as possible. But if you’re so inclined JavaScript actually gives you the option to work at a bit level using bitwise operators:

Operator Usage Description
Bitwise AND a & b Returns a one in each bit position for which the corresponding bits of both operands are ones.
Bitwise OR a | b Returns a one in each bit position for which the corresponding bits of either or both operands are ones.
Bitwise XOR a ^ b Returns a one in each bit position for which the corresponding bits of either but not both operands are ones.
Bitwise NOT ~ a Inverts the bits of its operand.
Left shift a << b Shifts a in binary representation b (< 32) bits to the left, shifting in zeroes from the right.
Sign-propagating right shift a >> b Shifts a in binary representation b (< 32) bits to the right, discarding bits shifted off.
Zero-fill right shift a >>> b Shifts a in binary representation b (< 32) bits to the right, discarding bits shifted off, and shifting in zeroes from the left.

Sources

Ngrok - Secure tunnels to localhost Dec 06, 2015

I had to use ngrok for testing our web app on an ipad today. ngrok is an amazing tool to have in your toolbox, but I can never remember the name, so thought I would use the occasion to put it here.

Demo without deploying

I use ngrok when I want to quickly show something to one of my colleagues without leaving my desk.

ngrok http -subdomain=project-name homestead.app:80

Boom slack the link to your colleague project-name.ngrok.com.

One nice benefit of this is that if you’re running BrowserSync for the project you can actually see people interact with your domain. Will cause troubles if you send the link to multiple people though.

Simplify mobile device testing

Today I needed to check some iOS specific javascript. Spin up ngrok, 5 seconds later I have my localhost on my iPad and my iPhone.

Build webhook integrations with ease

I used ngrok for this purpose at Kanler all the time. We had a lot of integrations that required webhooks — mainly Twilio services.

When you wanna play with a new API or Service that uses webhooks ngrok is simply invaluable. You can use the ngrok interface at http://127.0.0.1:4040/ to read what the webhook is sending you. If you’ve ever been in this situation you will know how big of a time saver that is. Don’t mind poorly worded documentation, just see what you’re getting.

Further Reading

VueJS CSP compliance and Chrome Apps Dec 01, 2015

I used to be a AngularJS user, but it’s a very heavy tool for most projects. ReactJS was a leap in the right direction and I really enjoy using it. But VueJS is by far the most lightweight (usable) framework I’ve found.

ReactJS does require quite a bit of work to get your head around. Even then there is quite a bit of setup and boilerplate code. VueJS on the other hand feels like you’re writing a template with the minimal amount of code outside of the template.

It’s put perfectly on the vuejs FAQ:

But one issue with React (or JSX) is that your render function often involves a lot of logic, and ends up looking more like a piece of program (which in fact it is) rather than a visual representation of the interface.

Cross Site Policy

I’m writing this extremely simple Chrome App which VueJS is perfect for. But Chrome Apps are restricted in what they can do for security reasons, so AngularJS or VueJS won’t run in them out of the box. In particular it’s the js logic stored in the DOM. The frameworks use functions to interpolate strings into executable javascript which is not allowed. The only way to get around this restriction is to download the CSP compliant version.

Luckily VueJS maintains a CSP branch that you can download.

Caching and E-Tags Oct 10, 2015

I’ve looked at caching and e-tags in particular on multiple occasions over the years.

Caching is usually implemented when a bottleneck has been hit. In most small applications this will be one page that requires complex queries across your database. If you’re lucky the freshness of the result isn’t too important and you can just cache the result for a fixed time period, reducing load times quite a bit.

So you pull up the code that’s causing the problem and use your frameworks caching layer to cache it for 1 hour and boom you’re done.

You could go the extra mile and save on bandwidth by adding html cache headers to the response (Cache-Control, Expires, Last-Modified, pick your poison).

This is a great solution, but what happens when you need to invalidate the cache as soon as the underlying resources updates? If you are presented with this problem you will most likely stumble upon e-tags.

E-tags our savior, or not really

The promise of e-tags is great. Every page has a version number or a tag (hash), so when a page is requested we can quickly check if there’s a newer version available. This sounds great, but how do we create these version numbers? That is the dirty secret. When you first read about e-tags you will see implementations that render the entire page and creates a md5 hash from it. This md5 hash is then used to check if there’s a new version available.

The problem with this approach is that you’re still hitting that expensive query on every request. The real saving here is on bandwidth. If the user already has the latest version your server will just send back HTTP 304 “Not Modified”. Sure this can save you a lot of money at scale, but it’s not fixing the problem of long load times.

E-tags done right

The problem above was with the implementation not e-tags as a concept. Instead of loading the entire page to create a version tag, we should instead decide the minimal amount of work necessary to create the version number. If we didn’t change the view file, why would we need to render the view to make a md5 hash? Couldn’t we make an md5 hash of the data and achieve the same result? We absolutely could.

Going further do we need to do data processing before we create the hash? No. So with a little more effort it is possible to bypass bandwidth, view creating and data processing. Suddenly e-tags start to make sense, but often the most expensive calls in your app is calls to the database. How can we move the version e-tag comparison up before your database calls?

We need to flip the current approach on its head. Currently we’re creating version tags as an afterthought. Instead we need to create new version tags as soon as the underlying data changes. Instead of creating the same version tags on every request we need to create a dependency graph for every page and check if a resource is in that graph on save. If a resource is in the graph then the version number needs to change. Now validating the e-tag is is as fast as your cache can fetch the latest version tag. Implementing this is far more complex than making a md5 hash of a request, but in some cases it’s worth it.

I’ve put it on hold for my current app temporarily so I don’t have the full implementation notes yet. But when I do implement it I will create an event listener and push every resource change to a queue. The graph will be stored in json and the version numbers will be stored in redis keyed on controller function names.

Sources

GreenSock - Web Animation Oct 08, 2015

Just stumbled upon this amazing js animation framework. It’s blazing fast and easy to write which is great, but what blew me away is the following demo’s:

Morphing between SVG paths in smooth animations

Compose Animations as Timelines

Free to use, even commercially

GSAP is absolutely free to use. They do sell licenses for some niche use cases, but most projects should be able to use the free license.

Some of the plugins do require a license, including the MorphSVGPlugin sadly. But at $50 a year it’s not bad at all.

Read more about GSAP on their site, greensock.com.

Web Bluetooth Oct 07, 2015

At Powaband we’re building hardware and for that reason our applications need to interact with said hardware. As a web developer this is not a very common problem to solve. So it’s been interesting to work on it.

There is in fact a spec for bluetooth access in the browser, called web-bluetooth, but it’s still early days. Currently the API is only available in Chrome and only if you enable an experimental developer flag. Obviously not something we can make customers use. The api is however also available for Chrome apps as can be read in the documentation.

What can not be read in the documentation is that bluetooth low energy (BLE) is only available on Chromium. This took some testing to figure out, but it can also be found in the form of an issue (#449682) in the Chromium project.

I will keep my eye on this issue and can’t wait to see it be resolved.

Bluetooth in General

It’s been interesting to see how the bluetooth spec works. Simply put we have Device UUIDs, Service UUIDs and Characteristic UUIDs.

You want to connect to a device so you use the devices UUID.

But what can the device do? To answer that we have service UUIDs which are things like device information, battery status or heart rate for example.

But for any service there might be multiple important pieces of information to request. To get a specific piece of information we use Characteristic UUIDs. For device information it might be manufacturer, serial number, etc. for heart rate it could be beats per minute or location of the sensor.

Note: Chrome apps can be opened with links. This means that in the future we can have a sync button in our web app that will open our chrome app that has access to bluetooth. This would create a surprisingly compelling user experience.

Documentation:

Homestead: Fix slow I/O access Oct 04, 2015

I recently saw really poor performance on my homestead vagrant box. Pages that on other machines load in 100ms would load in +1sec.

After a lot of playing around I found the issue to be I/O access. At that point it was easy to discover that enabling NFS on vagrant machines can increase I/O performance quite a bit.

Enabling NFS for shared folders

In homestead.yaml for your shared folders add the type: nfs option like so:

- map: "/path/to/project/on/host"
  to: "/home/vagrant/homestead"
  type: nfs

Then run: vagrant reload to make the new settings go in effect.

Increase CPU core usage

Couldn’t help but search for other potential speed improvements now that I was at it. It was suggested to increase the number CPU cores in use. At least for my uses cases this won’t really result in any gains, but oh well it’s worth a mention.

For most people setting this to the number of cores on your machine will be the right choice. The full explanation of why can be found here.

In case you don’t know how many cores you have you can use sysctl -n hw.ncpu to find out.

Sources