Blog

  • Thoughts on Net Neutrality

    Thoughts on Net Neutrality

    Saw another article opposing net neutrality. They described it as “the idea that bandwidth should always be free to whichever sender wants to use it”. Before I talk about net neutrality, let’s cover a bit about how things work.

    Right now, if you want to access the net, you pay an Internet Service Provider (ISP) like Rogers. The more data you send/receive, the more Rogers will charge you.

    Rogers on its own cannot get your data around the world. So they pay another company that’s in the business of connecting networks together. Rogers is charged by their usage, a cost that’s passed onto you. This other company will have agreements with others like it and perhaps undersea cable operators. Whatever it costs them, that gets filtered down, and ends up on your bill.

    Now on the other side of the world, whoever gets your data would have paid their ISP for the traffic used, and their Internet backbone, etc. Everyone that’s part of the chain gets a cut.

    However, companies like Rogers have pushed this idea that the companies at the other end of the chain should pay them too. So if I surf to Netflix, Netflix should pay Rogers. They claim that they ought to be compensated for the heavy traffic a few individual sites incur. If the sites didn’t pay them, Rogers wouldn’t block them, but make them slower.

    There’s two things wrong with this. The first is that Rogers is already compensated for receiving that traffic. Customers pay Rogers not only to send data, but to receive data as well. That all gets factored into their monthly totals that they’re billed for. Rogers would be charging twice for receiving data.

    The other thing that’s wrong with this is that the Internet is data agnostic. You pay by how much traffic you send/receive, not by where the destination happens to be. Whether it’s 2 GB of data from site A as compared to site B doesn’t make any difference for Rogers in terms of their own operational costs. Rogers wouldn’t even know that your traffic was to/from Netflix by looking at the data itself. They’d have perform an extra step and query the DNS records for Netflix to see if the IP addresses matched.

    In other words, the technical justifications behind these fees are bogus. This is a money grab by companies like Rogers, who see an opportunity to double bill. It makes fiscal sense from their end to push this, as it would signify greater profits. However, wider adoption of such policies would have significant ramifications for how the Internet works.

    The user would be the first casualty, as Rogers would purposefully degrade their Internet connection (the one they paid for) whenever they interacted with a site that didn’t capitulate. The sites too would lose out, because not only would they have to continue to pay for the traffic they’d use, but would now have every single ISP on the planet also try to bill them. The Tier-1 networks, meanwhile, which actually make the Internet happen wouldn’t see an extra cent. Everyone would be worse off, except for the likes of Rogers.

    Net Neutrality posits an opposition to such a model. It doesn’t say that bandwidth ought to be free but rather a recognition that double billing in the manner suggested is untenable.

  • Kitchen Experiments: Tea Bread

    Kitchen Experiments: Tea Bread

    I’ve been baking a fair amount lately, and that means some experimentation. Some works, more doesn’t.

    Well, count this as a success: tea bread. Infuse bread with the aroma of your favourite loose leaf tea for a smooth flavour that isn’t overpowering.

    The bread recipe I use calls for a cup of water. I replaced that with a cup of Green Chai tea. I made sure that it had cooled before mixing it in, as I didn’t want to kill the yeast. I then added the soaked tea leaves and a dash (1/3 tsp) of baking soda to disarm the tea’s bitterness. Amorphous blob shape aside, it turned out real nice.

    The tea infusion worked well with pizza dough as well. I used it in a folded pizza that was stuffed with ground beef, grilled peppers, onions, mushrooms and topped with BBQ sauce and cheese.

    IMG_20121215_174540 IMG_20121215_175127

    I also made chocolate baked doughnuts over the weekend using a recipe from Mama’s Gotta Bake. I screwed up the glaze portion (too much milk), so I threw in icing sugar and cocoa powder to make up for it. It worked. It tasted like miniature chocolate cake, and there’s nothing wrong with that!

    I also got together with a friend last week for some de-stressing pie making. Blueberry.

  • Vegan Maple Cinnamon Roll Doughnuts, Garlic Basil Bread and Eggless Pasta

    Vegan Maple Cinnamon Roll Doughnuts, Garlic Basil Bread and Eggless Pasta

    I made more doughnuts today using two vegan recipes. The outcome of one recipe was underwhelming, but the other was… godly. It was a variation of the tried and true baked cinnamon roll doughnut recipe I blogged about earlier, and are without question the best ringed creations I have made to date. Superior to the non-vegan version.

    In a luck of the draw, the loaf of garlic basil bread that I improvised turned out perfect and fluffy. The pasta turned out swell too. I’ve included the recipes here. The doughnut recipe requires a doughnut pan, as the batter is too runny to hold its shape without assistance.

    Baked Vegan Cinnamon Roll Maple Doughnuts Recipe

    Stage One: The Cinnamon Topping

    • 2 Tbsp Butter (Earth Balance Spread)
    • 5 Tbsp Sugar
    • 1 Tbsp Molasses
    • 2 Tsp Cinnamon
    • 1 Tsp Milk (Unsweetened Almond Milk)
    • 1 Tsp Corn Starch (aka. Corn Flour)
    • 1 Tsp Vanilla Extract
    1. In a bowl, mix the sugar and the molasses to make brown sugar.
    2. In a sauce pan, melt the butter. Once melted, add the sugar and all the other ingredients. Wait for it to bubble.
    3. Once it bubbles, take it off the heat. Pour a teaspoon or two in the bottom of each doughnut mould.

    Stage Two: The Doughnut Batter

    • 1½ Cup All Purpose Flour
    • ½ Cup Sugar
    • ½ Cup Milk (Unsweetened Almond Milk)
    • ¼ Cup Butter (Earth Balance Spread)
    • ¼ Cup Unsweetened Apple Sauce
    • 3 Tsp Baking Powder
    • ¼ Tsp Salt
    • ¼ Tsp Nutmeg
    1. Melt the butter. In a small bowl, mix the melted butter with the apple sauce and milk.
    2. In a large bowl, combine the flour, sugar, baking powder, salt, and nutmeg.
    3. Add the contents of the small (wet ingredients) bowl into the larger (dry ingredients) bowl. Fold until just combined – you don’t want to overdo it.
    4. Pour the batter into the doughnut moulds.
    5. Bake at 350F. The doughnuts are ready when you push down on them and they inflate back to their old shape. Around 10-15 minutes.
    6. Pull out the doughnuts and cool.

    Stage Three: The Maple Frosting

    • 2 Cup Icing Sugar
    • ⅓ Cup Butter (Earth Balance Spread)
    • ⅔ Cup Cream Cheese (Tofutti)
    • 2 Tbsp Maple Syrup
    1. Mix the ingredients until uniform.
    2. I use wax paper to make a piping bag, then pipe it on top of the doughnuts.

    Gluten-Free Version: Substitute the flour for all-purpose gluten-free flour. Also add 1 tsp of xantham gum to the dry mixture from stage two. I found that these needed to be left in the oven a few minutes longer as well.

    Garlic Basil Bread (With Bread Machine)

    • 3 Cup All Purpose Unbleached Flour
    • 1 Cup Water
    • ¼ Cup Vegetable Oil
    • 1 Tbsp Sugar
    • 1 Tbsp Salt
    • 1 Tbsp Basil
    • 1 Tbsp Garlic
    • 2½ Tsp Yeast
    • 1 Tsp Vinegar
    1. Place ingredients in bread machine.
    2. Set on the white bread mode and go.

    Eggless Pasta (With Pasta Maker)

    • ⅔ Cup Semolina Flour
    • ⅓ Cup All Purpose Flour
    • 1 Tbsp Oil
    • 3+ Tbsp Water
    1. Mix the flours.
    2. Add the oil. Add water and knead until the pasta holds together. Split into two or three pieces and pass through the pasta maker.
  • End of the First Semester

    End of the First Semester

    I MADE IT. Almost.

    I have one last assignment and a few exams to do, but the classes and labs are pretty much done. Tuesday, Wednesday and Thursday were pretty much a single uninterrupted day for me. I realized at one point that I hadn’t eaten in 30 hours.

    It’s been a challenge. Going back to a chemistry lab after a nine year break, when they assume that you had done it all last semester, has meant I had a fair bit of extra catching up to do. Finding time for work has been tough, though I’m very fortunate in having an employer that’s given me the flexibility to choose my own hours. Finally, going from making $2500 a month to $1000 has been a most humbling experience.

    I have much to be thankful for. Things are working out, and no matter how it all unfolds later, I wouldn’t of been able to get this far without the support of those closest to me. I honestly don’t know how I did it the first time round, but I know for sure that if it wasn’t for people like you, this second go at school would of been nothing more than a nice thought.

    So this is to you.

  • My Ideal Visual Programming Environment

    My Ideal Visual Programming Environment

    Introduction

    I’m going to talk a bit about visual programming and how I’d like to see it done. Be warned, this post reads like one of those start-up pitches from a business student.

    Grouping & Infinite Canvas

    Flowcharts are a natural and intuitive way of representing logic. It’s how some existing visual programming environments such as the Illumination Software Creator go about it, and it’s how I’d approach the subject as well.

    The big limitation of doing things this way has to do with complexity. Say each block of the flowchart represents an action. With only a few blocks on display, the program’s logic is immediately clear. But start to tack on block after block, and that flowchart becomes an opaque mess.

    The way I would overcome this is to allow groups to be grouped together on an infinite canvas. I’ve done a quick mockup to illustrate what I mean, shown below.

    On the left is a flow chart representing a program that retrieves the current weather for my city and then displays it for me. First it loads the data from a web page, then it parses the contents of that page for the relevant information, before finally displaying it.

    The parsing stage is a bit more involved than what’s presented, but those details aren’t relevant to the big picture. So the boxes that would make up that more intricate logic are grouped together in a single box labeled “Parse Data.” Zoom in, and the logic that makes up that step is revealed. You could keep siphoning portions of logic away like this, always making sure that what the program does is clear, while the mechanics of how it functions is hidden until needed.

    Only Show the Minimum

    Many existing visual programming environments tend to show every possible action with one of the blocks. Take the following screenshot for Apple’s Quartz Composer.

    Visual Programming: Quartz Composer

    In this image, you can see that all the possible ways to interface with each block is stipulated. While this is practical while programming, it undermines the clarity afforded by using flowcharts. You end up with a bunch of text on display that are entirely irrelevant to the final workings of the project. So I would only present these options when explicitly desired, by way of a radial menu that pops up when the mouse approaches a block. Otherwise, they’re hidden away.

     

    The blocks that appear would be shaped to indicate whether they’re inputs, or outputs.

    High Level for Modern Times

    I argue that high-level languages aren’t so high-level anymore. Yes they are more abstract than their antecedents, but the problems they’ve been asked to solve get more and more complex while the languages and their standard libraries remain frozen in the time of their inception. The end result is that the amount of boiler plate code programmers need to write goes up as the language gets older, less they embrace third-party libraries.

    I’d move up the bar of what high level is. Software developers would no be required to explicitly open and close files – when they’d want to write to a file, they would just put a block symbolizing the file to write to. For HTTP requests, it would be as simple as specifying a URL to send/receive from. Cut down the boiler plate code.

    Likewise, don’t burden the programmer with types. Think about all ways we can store numbers: a two byte integer, a four byte integer, an unsigned integer, a single or double precision floating point number, a complex number, something like BigNum, etc. There’s very good reasons why these types exist, but in most cases, which one is the right one could be determined automatically at run-time. So this language would be a dynamically and loosely/weakly typed. The only thing that would matter is if there’s one of it, or many of it (see below.)

    Embrace Concurrency & Parallelism

    The flowchart model lends itself well to concurrent programming, where you have multiple logic trees being executed simultaneously. With traditional programming languages, you’d have to set-up threads for each piece of code you wanted to run at the same time. With visual programming languages, it’s as easy as having “two arrows coming out of your block.”

    Earlier I said that variables would be typeless, and that the only distinction would be whether there was one of it, or many of it. By  keeping track of whether there’s many of it, we open the doors to easy parallelism. Thin arrows between blocks indicate “one of it”, and thick arrows mean “many of it.” Applied to a block that adds a number to an input, you could have the computer do calculations in parallel. Each item in the “many of it” could itself be an array, opening up the doors to multi-dimensional datasets.

    Event-Driven from the Get Go

    Any application that reacts to asynchronous I/O events relies on executing code following an event. It can be as simple as an infinite while loop, but it’s there. That’s almost every single modern application out there. Yet we always start from a baseline where that isn’t the case, and we have to put in an event loop ourselves or whatnot.

    Many visual programming languages are already event-driven. This one would be too.

    The Best of All Languages

    For this theoretical programming environment to gain traction, it has to be useful. Yet it’ll be anything but if only supports a handful of use cases on launch. So to give it any chance of widespread adoption, you have to ride on the success of others.

    In other words, allow people to easily integrate code written in something like Python. That way if there’s no blocks to do what they want, they can invoke a “Python” block where they can call libraries that let them perform the specialized task.

    Built-In Revision Control

    To my knowledge, no visual programming environment has built-in revision control. And current text-file oriented systems are entirely inadequate to show how one revision in a visual environment differs from another. So I’d integrate revision control into the programming environment.

    I envision it as something where you can slide back and forth between commits, and see how the the contents of the canvas morph. Animations would show blocks move if they did, or pop in with a visual cue if they were added. You could see the changes by branch or by user.

    Integrated Debugging & Profiling

    If your program didn’t behave as expected, you would be able to execute the code in steps, block by block. The arrows in between blocks would animate as data travelled from one to another. Or you could set breakpoints where the program pauses when it reaches a specific point. The data passing through any arrow could easily be exposed.

    Mouse or Finger, Will Travel

    This software needs to be an experience that works as well with touch-only interfaces as with those systems that have a mouse and keyboard. It cannot feel like “it’s made” for the other input device. Sure, it’ll embrace the information-spartan paradigm common to mobile applications, but that doesn’t mean it has to be any less pleasant to use with the good old mouse.

    So what does that mean? For fingers, pinch and drag will zoom, while for the mouse, it will be achieved by the scrollwheel. To select multiple blocks, the mouse might click and drag, while fingers might swipe around the objects. Right-clicks will still deliver contextual menus, and so forth.

    Yep, Looks *ARE* Important

    There’s a train of thought that places general appearance as a secondary consideration. I believe that if you want people to embrace your product, you have to make looks a first-class citizen. I think the developers who made the platform pictured below had the right idea.

     

    tumblr_memb77v5n01qz4mo8o1_1280

     

    There is a very functional reason for this: every thought you put into how things will appear translates into a better experience. The user may never have seen this environment before, but if you tap into that wealth of things they’re already familiar with, they’ll be able to use it much sooner. It reduces the learning curve. It makes understanding how the blocks all fit together take that much less time, by for instance, having all the arrows between boxes animate to show which way the information is flowing.

    Make this easy enough, and you might tap into an audience of “casual programmers” that use this to assist them in their daily doings. No one’s come up with a successful programming analogue to the likes of Microsoft Access that appeals to the likes of secretaries and payroll officers. There’s room for one.

    Conclusion

    If you think any of these ideas are good, please steal them. Not that I should be credited for any of what I wrote here, given that there’s prior art in all instances.

    Relevant Reading