The dying web

Maybe you haven’t noticed, but the web is dying. Regardless of which network or client I am using, every time I reload Twitter, GMail, or Reddit for that matter – It takes longer and longer time. Of course, at some point, these websites will simply require so much CPU and bandwidth resources locally for my client(s), that I will simply “give up”, and I suspect so will millions of others, at roughly the same time.

Ever since 1942 (something), we’ve been blessed with Moore’s law. A week ago, we got to taste a little bit of Murphy’s law, and every single client and server on the planet, lost half its CPU performance OVER NIGHT! This implies that your router is now running at 50% of its previous capacity, the web servers are running at 50% of its capacity, and the JavaScript runtimes in our browsers are running at 50% of their capacities. However, even before “Meltdown”, we had been on a downwards spiral for a looooong time.

Twitter is using roughly 4MB of bandwidth, on a page reload, with an empty cache. GMail is consuming 5.4MB of bandwidth. When I started doing these performance measurements about a year ago, GMail was only consuming 4.2MB. Obviously something is very, very wrong with “the web”

For decades we have been living on “borrowed performance” (Quote; Miguel DeIcaza), and we have been spoiled, to the point where we started thinking that it was OK to spend 5MB, simply downloading a handful of 160 characters long messages from our friends and colleagues. This is obviously no longer “OK”. The other day, I went through my friends list on Twitter, and I realised that most of the people I used to work with – Haven’t written a single Tweet for several years! And I suspect you’ll notice the same, if you go through your list of friends. I don’t know where these people are hanging out these days, maybe at coffee shops? Or maybe the local mall? For that matter, maybe this is a *good* thing …?

At the same time, the “bots” have arguably taken over Twitter, to the point where the computers have started engaging in “discussions” between themselves, sending gibberish back and forth, I suspect they don’t even remotely understand themselves. I have “bots” following me, every day, with hundreds of thousands of “followers”. Who are these followers …? Skynet drones …?

Are you OK with such a development Twitter …?

Everybody knows the fix for this, but nobody has the courage to speak out about it, because it implies radical change, to the way we perceive “the web” ...

The “new and improved” Twitter

Think globally, shop locally!

When I was living just outside of San Francisco, the above signs were literally plastered all over the place, on every single available wall, in and around Sonoma County and Napa Valley. Which is kind of ironic, since apparently 98% of every single bit moved through the internet, either directly, or indirectly, goes through San Francisco these days. It doesn’t take a rocket scientist to see the problem here …

The argument is that if we created a distributed web, the bits and bytes would (obviously) move WAAAAAAAAAAY faster from the servers to our clients. In addition, this would require creating new websites and apps, based upon new axioms, not requiring the servers to push 5MB of *crap*, simply to illustrate an animated GIF or two in our browsers. I have no idea why Twitter or GMail are using 5MB of bandwidth to put an animated GIF, and/or a couple of email subjects into my browser – But I do know that at some point, I will simply “walk away”

And so will millions, if not billions of others too …

In case you believe I am not telling the truth, feel free to check out my reference and data here. And data simply doesn’t lie …!!

Edit; I was permanently banned from Reddit’s /r/webdev for posting this article as a comment to my own thread. As to which I asked the moderators the following; “Errh, why?”. However, to be honest I don’t even care why …

Advertisements

Switching from React JS to P5 makes you 3.15 times as productive

I figured I’d port the React sample Tic Tac Toe game to Phosphorus Five, to check up how P5 is doing in regards to LOC (Lines Of Code), compared to React JS. I was able to reproduce their tutorial Tic Tac Toe app with 73 lines of Hyperlambda. React JS used 230 lines of code to accomplish the same.

According to several studies in the subject, the number of lines of code in your software project, is directly proportional to the amount of effort you’ll need to invest when creating it. In addition, the number of bugs in your end result, also grows proportional to your LOC.

Hence, according to this study, once you’ve mastered P5 and Hyperlambda, you’ll be 3.15 times as productive with P5 as you previously were with React JS. And you’ll have 3.15 times as many bugs in your React JS solution. Hint; 230 divided by 73 becomes 3.15.

This doesn’t surprise me much though, since I have found similar numbers when comparing Hyperlambda solutions towards literally anything else out there.

Bandwidth performance

It is difficult to figure out the exact bandwidth usage of React JS, since their example is hosted at CodePen, which downloads a shitload of JavaScript and CSS stuff for their boiler plate editors – But simply checking the size of “react-with-addons.js”, it becomes 159KB. Obviously, measuring the markup and CSS necessary for the example, would make this number larger. The Phosphorus Five example, doing the same, downloads 15.3KB in total. Which means that React JS spends at least more than 10x the amount of bandwidth as a similar solution built in P5.

Below is the Hyperlambda code for reproducing my example locally on your own P5/System42 installation. Download P5, System42, create an empty CMS “lambda” page, and make sure you set the “template” settings to “empty”, before you save your page.

p5.web.include-css-file:@MICRO/media/main.css
add:x:/../*/create-widget/**/div
  src
    class:row
    widgets
      literal
      literal
      literal
add:x:/../*/create-widget/**/literal
  src:"innerValue:"
add:x:/../*/create-widget/**/literal
  src
    onclick
      micro.samples.set-check:x:/../*/_event?value
create-widget:foo
  events
    micro.samples.set-check
      _next:node:"_val:X"
      set-widget-property:x:/../*/_arg?value
        innerValue:x:/@_next/#?value
      if:x:/@_next/#?value
        =:X
        set:x:/@_next/#?value
          src:O
      else
        set:x:/@_next/#?value
          src:X
      p5.web.widgets.properties.get:foo
        innerValue
      _data
        O
        X
      _win
        0,1,2
        3,4,5
        6,7,8
        0,3,6
        1,4,7
        2,5,8
        2,4,6
      for-each:x:/@_data/*?name
        for-each:x:/@_win/*?name
          split:x:/@_dp?value
            =:,
          if:x:/@p5.web.widgets.properties.get(/{0}/*/={3}|/{1}/*/={3}|/{2}/*/={3})?count
            :x:/@split/0?name
            :x:/@split/1?name
            :x:/@split/2?name
            :x:/@for-each/@_dp?value
            =:int:3
            create-widgets
              micro.widgets.modal
                class:micro-modal
                widgets
                  h3
                    innerValue:Winner was {0}
                      :x:/@for-each/@_dp?value
  widgets
    text:@"
THIS-IS-A-STYLE-TAG
.row p {
border:solid 1px black;
width:30px;
height:30px;
font-size:26px;
margin:0;
padding:0 0 0 7px;
}
THIS-IS-THE-END-OF-THE-STYLE-TAG
"
    div
    div
    div

For the record, the above code could probably have been commented, and more nicely formatted. But since the same was definitely true also for the Tic Tac Toe game implemented in React JS, I feel the comparison is a just comparison. Since I want to create something as “similar as possible”, I felt justified in not nicely formatting my code in any ways.

Notice; Unfortunately WordPress won’t allow me in any ways to encode HTML elements, so the “THIS-IS-A-STYLE-TAG” and “THIS-IS-THE-END-OF-THE-STYLE-TAG” above, must be exchanged with the “style” element from HTML, with no attributes.

PS!
I know the above Hyperlambda code is crap, but so was the React JS code …!! 😉
I spent 20 minutes on it, and could probably have further reduced it in size. But I think you get the point …

HOWTO hire a million system developers

Developers are amazing. Most of them have this urge to share whatever they create with the rest of the world. Basically, to accomplish having a million developers working for you hence, is just to facilitate for an environment where sharing is so dead freakin’ simple, that it can be done, by simply clicking a button.

Phosphorus Five is that environment. If you don’t believe me, feel free to check out my previous blog. Pay especially attention to how I am able to create a reusable component out of a specialised solution, in no more than 5 seconds. This reusable component again, could easily be uploaded to some common “code sharing website”, which would allow its users to rapidly search for pre-fabricated components, solving their problems, whatever they are.

Basically, the end result being, that once Phosphorus Five acquires “tipping point”, one inevitable results will be, that you have millions of developers, sharing their components – Either for a small fee, or gratis, depending upon their own motives for sharing. Ending up with that you, have a million system developers, which you can use, to help you create your solution.

Then some words from our sponsors 😀

You just have to love this fella … 😉

For the record, I once saw Steve Ballmer speaking in Oslo about 15 years ago. And it was just freakin’ amazing. Now imagine having a 100x as many developers working for you, as Microsoft, and Silicon Valley have combined. What would this do to you …?

MimeKit, simply the best MIME parser out there for C#

I have done a lot of work on MIME, meaning the Multi purpose Internet Message Exchange standard. This standard is at the heart of being able to send and receive emails, over e.g. POP3 and/or SMTP – Which are the two most commonly used standards for retrieving and sending emails.

Every time you want to send an email, you are basically using the MIME standard, which allows for “multiple entities”, such as attachments, HTML views, plain text views, etc. Hence, at least having a partial understanding of how MIME works, is crucial in order to be able to create software that somehow sends or retrieves emails. I have researched several different MIME parsers in the .Net space, and I have concluded with the following basically.

Unless you’re using MimeKit, you’re doing something wrong!

Every now and then, some geek comes around, and is able to do some really incredible thing. Jeffrey Steadfast is one of these guys. He has created the fastest MIME parser in existence previously in C, and over the last couple of years, implemented a MIME parser for the CLR. MimeKit can be found here. If you don’t believe me, look at his performance benchmark of his own baby compared to the alternative MIME parsers out there, at his GitHub website for MimeKit.

MIME is a notoriously difficult to understand standard (like most of them are), full of arcane language, and cross-references to other standards. Luckily, Jeffrey have created a brilliant API, which allows you to more easily understand how to create MIME messages, without having to wade through tons of documentation.

Below I have a video, demonstrating encrypting and putting more than 5000 PNG files into a single MIME message, using MimeKit at its core. On my MacBook Air from 2015, it is able to do that job in roughly 7 seconds. For the record, that’s staggeringly fast!

Even Microsoft has publicly announced that it is the superior MIME parser, indirectly, by making it become the recommended MIME parser, through making the old SmtpClient obsolete, and encouraging its users to use MailKit instead. MimeKit simply rules!

I’ll do 90% of your work for €57

Software development is a weird profession in many ways. For instance, if you can solve a problem once, the cost of solving the same problem 1 billion times, is the price of copying a file.

That I will do 90% of your job for €57 might sound weird. After all, you’re likely being paid 50-100.000 dollars per year for doing your job today. The idea that I will do 90% of what you do today, for €57, might at first seem ridiculous. However, I have already done most of your job! Assuming you’re a web developer at least.

This is because all software projects have similar problems. For instance, most of your web apps requires you to solve some repeating problem, over and over again, for each project you do. If you could extract the commonalities for your solutions, and create a re-usable component out of them, you would end up with having permanently solved that problem, for the rest of your life!

I have created software since I was 8 years old. I am 43 today. In 2011 I had a somewhat nervous breakdown, due to having worked 80 hours a week, for almost 20 years straight. I quickly realised that I am not alone in these regards. Most developers are suffering from inhumane expectations, and hence tends to burn out long before they’re supposed to retire. I decided to bounce back, and solve this problem, out of compassion for other developers.

All the software that we create, have basically 90% of its problems in common. I have been able to over the last 5 years, pinpoint these commonalities, extract them, and create generic solutions for them – At least when it comes to web apps development, and especially within the enterprise space.

In order to do this, I had to create a new programming language called “Hyperlambda”,  invent a new way to create Ajax, and create a new design pattern called Active Events – To significantly reduce the complexity of having components integrate with each other, and play together, almost the same way the musicians in a symphony orchestra plays together.

In this process, I was able to improve your productivity 10x, improve the quality of what you create with sometimes as much as 100x, eliminate 90 percent of your potential bugs, and increasing the security of your apps by at least one order of magnitude.

The funny thing, is that you don’t have to believe me. In fact, I want you to disbelieve me! Only by being critical to my claims, you can become able to find the truth for yourselves. I have therefor chose to create my solutions as Open Source and Free Software solutions, to allow anyone wanting to test my claims to download it for free, for themselves to verify my claims. You can find my code at GitHub.

Then after you have found my claims to be correct, you can purchase a commercial license, that allows you to create closed source apps. Just please remember, that the €57 offer is only valid until the 15th of July 2017!

If you think I am full of bullshit, and don’t care to spend time checking out my claims – Then please realise that I have been published twice in MSDN Magazine about my ideas!

If Microsoft is willing to give my ideas some space, wouldn’t it be wise for you to do the same …?

Buy a better life for €57

Having a Coconut on the local restaurant in Brazil

If you’re a software developer, chances are you’re having a shitty life. Working 70 hours every week, trying to meet unrealistic expectations, from customers you probably deep down inside hate. I can solve your suffering, by making you equally productive as you are today, without having to work more than 1 hour every day!

It’s really quite simple to understand in fact too. I can basically make you apprx. 10-100 times more productive than what you are today. And I can prove it with math and science!

A commercial license to Phosphorus Five will cost you €57. Such a license, will allow you to develop proprietary and close source software with P5, at least 10x as fast, and at least 100x the quality, of what you are able to do today with your existing tools!

Don’t believe me, keep on reading my blog, and see with your own eyes, how I have spent most of my life for the last 5 years, travelling the world, working as little as possible, still outperforming all software developers on the planet, in regards to all performance criteria possible to measure with science!

Then check out my photos for yourselves … 😀

Just another normal day at the office!

I used to attend private parties here dude!! 😉

With our camping car in North Norway

The view from “Bodil” our first night in Lofoten. This photo was taken 1AM in the morning!

Yours truly making dinner for his beautiful girl somewhere in Croatia I think …?

My friends from Venice Beach!

My office in Berlin

My office in France

My office in Cyprus

The view from my office in Italy

The entrance to my office in Brazil

Celebrating my birthday at my office in Cyprus

Veni, vedi, vici!

What does the speed of your Ajax web app really mean?

I have created several blogs lately where I have measured the performance differences between Phosphorus Five and all sorts of alternative Ajax libraries, such as jQuery, Infragistics, ExtJS, etc. The numbers are in the range of 50-200 times less bandwidth usage. However, what does this actually mean for you as a web developer? Well, let me use my own home as a use-case …

I am on a 50Mb connection where I live. However, my upload speed is only 5Mb. That translates into being able to upload 0.625 MB per second.

Below I have a screenshot of Sephia Five. The important parts are the parts encircled with red. The total initial download is 59.5KB of data. Notice, my cache is turned off though, as you can clearly see. If my client had cached the static resources, the total initial page load would have been 8.6KB to load my inbox.

Assuming 98% of the HTTP requests to my site has cached all the static resources, this would imply the average page load being around 9KB in total. Since my internet connection at home as a total theoretical limit of 0.625MB per second, this means that if I setup a web server at home, and paid $3 for a fixed IP address – I could theoretically serve roughly 73 clean page loads per second. Multiply that by the numbers of seconds per minute, and the number of minutes per hour, and the number of hours per day – Means I could serve 6307200 page loads per day!

If we assume that I have a shit load of users in my “GMail competition company”, and each user loads his inbox on average 10 times each day. This means I could create a GMail clone, all other factors set aside, and have 630720 users being my customers, on an average home internet ADSL connection, with really shitty bandwidth. Google is using hundreds of thousands of servers to deliver their product, and they’re pulling their own cables across the Atlantic ocean, in combination with Facebook to be able to deliver their services fast enough.

I live in Cyprus, which has about 800000 people. Assuming 170000 of these are too young to read emails, this means that in theory, I have enough bandwidth in my home, to setup every single citizen of Cyprus with an internet webmail service, using my home ADSL connection as the foundation.

Of course, when creating a service for hundreds of thousands of monthly users, there are a lot of other factors that comes into play. The above numbers also assume that the page load is perfectly evenly distributed across all the 24 hours of a day. But in theory, over a “shitty home internet connection”, I could serve 6.3 million page loads every single day, over an internet connection, that costs me $30 per month! If I had a handful of 5-10 year old PCs, with very large hard discs, I could serve the entire island of Cyprus, with a PGP encrypted email service, with an initial cost of 5 10 year old PCs, and a fixed monthly cost of $33.

To startup a webmail company in Cyprus, serving the entire population of Cyprus with encrypted emails, would cost me (in theory) no more than $5000 in initial costs, and $33 per month for an ADSL connection.

If I charged my users $1 per month for my service, I would earn 669997 dollars per month!

For the record, the above is an extreme use-case, and wouldn’t be practically likely to pull off, since first of all the bandwidth consumption would spike in working hours, 8-4, and be close to nothing during the night, etc. In addition, it would require huge amounts of storage, which would cost much more than $5000. But it illustrates the importance of having a *tiny Ajax library*!

Below is a screenshot of GMail’s bandwidth usage for loading the same inbox. Notice GMail uses 3.9MB, which is 67 times as much bandwidth as Sephia Five! This means I would need 67 times as much network to host GMail, as I would need to host Sephia Five!

That is disruptive technology!

The incredible scientific facts about Phosphorus Five

If I told you I could make you 13 times as productive, and that you’d achieve 220 times better results – Would you believe me? How about if I showed you the scientific data behind my statements, and how my numbers was reproducible, and easily verified. Would you take the time to test my claims?

The reason why I am asking, is because the above numbers are in fact the numbers behind the Ajax library of Phosphorus Five. I realise you probably don’t believe me, so I have therefor made it possible for you to verify my numbers for yourselves, in less than 5 minutes. That way you have the opportunity to prove me wrong, and show the world that I am a fruitcake if you wish.

Notice, the data is built upon some of the existing best practices tools within our industry; jQuery and Infragistics. If you go to StackOverflow.com and search for jQuery, you will find that it returns 851376 results (20th of June 2017)

If you visit the Infragistics website, you will find that their tools are used by some of the largest companies in the world, such as Dell and MacDonalds.

Would you want to create 220 times better web apps than MacDonalds and Dell, for a 13th of the cost? What do you think that would do for you and your business?

Create 156 times faster apps with P5 than with ExtJS

When it comes to Ajax, size is everything. The less bandwidth your apps consume, the more responsive they will be. In the video below, I am demonstrating in a reproducible environment, how creating a simple Ajax TreeView in ExtJS consumes 156 times the amount of bandwidth as creating the same in Phosphorus Five.

This translates into that if you’re on a really shitty internet connection, where it requires 1 second to download the P5 Ajax TreeView – It would require 2.5 minutes to download the ExtJS equivalent.

The reasons for this, is because of a concept in P5 I often refer to as “Managed Ajax”, which allows you to build almost any Ajax control you wish, and rarely if ever exceed ~5KB of JavaScript. So while you’d have to download several megabytes of JavaScript to build a simple Ajax Tree control in ExtJS, you can get away with ~5 kilobytes doing the same with P5.

If you wish to reproduce my performance test, you can find the Hyperlambda necessary to do that below the video.

Create a new “lambda” page in the System42 CMS, paste in the following code, and make sure you set its “template” settings to “empty”.

create-widget
  parent:content
  widgets
    sys42.widgets.tree
      crawl:true
      items
        root:/
      .on-get-items
        list-folders:x:/../*/_item-id?value
        for-each:x:/@list-folders/*?name
          list-folders:x:/@_dp?value
          split:x:/@_dp?value
            =:/
          add:x:/../*/return/*
            src:@"{0}:{1}"
              :x:/@split/0/-?name
              :x:/@_dp?value
          if:x:/@list-folders/*
            not
            add:x:/../*/return/*/items/0/-
              src
                class:tree-leaf
        return
          items