Wednesday, December 31, 2014

Day 1 - 30 Day Challenge

Day 1: Learning AngularJS (vs Etoys)

So I have decided as I learn AngularJS to compare it to Etoys.  Admittedly not a fair comparison as both server different purposes, but hey its my learning journey and I will go where my strange mind and interests take me (I have found this path mostly useful and a lot of fun).

I am Shaping up with Angular.js from Code School.  I completed the first two levels.

So today I learned about:

  • Modules
  • Controllers
  • some directives
    • ng-repeat
    • ng-show
    • ng-hide
    • ng-src
  • Filters (uppercase, lowercase, currency, date, etc)
  • and some things about Bootstrap
The examples used in the course center around displaying a set of product data on the web.

I found myself thinking about how you do things in AngularJS vs how I would do it in Etoys.  Why you may ask would I want to compare two very different things?  Well while they are different at a very high level they are both tools for expressing ideas and both use MVC (Model View Controller).  Now when I say MVC I am not talking about the "modern" definition and use as found in various web frameworks such as AngularJS etc, but in the original definition from Trygve Reenskaug:
"The essential purpose of MVC is to bridge the gap between the human user's mental model and the digital model that exists in the computer." (see here)

Also I feel by trying to compare two very different approaches and trying to get to the "essense" of what they do and how they go about it I may actually gain some slightly deeper understanding.

I actually spent some time trying to build "directives" in Etoys and and while I created a "toUpperCase directive" and mapped a set of data (in a Holder) to a "Form",  it didn't feel right.  

I then recalled Dan Ingalls. The Live Web - Drag 'n Drop in the Cloud (video, JS CONF USA 2012) talk and thought that using connectors and converts would be a better approach. Basically I really like the idea of "connecting to a data source" then writing a converter to massage the data into a format that can be received by a visualization tool (table, list, graph, etc).


Tuesday, December 30, 2014

The 30 Day Learning Challenge

Martha Graham
“I believe that we learn by practice. Whether it means to learn to dance by practicing dancing or to learn to live by practicing living, the principles are the same. In each, it is the performance of a dedicated precise set of acts, physical or intellectual, from which comes shape of achievement, a sense of one's being, a satisfaction of spirit. One becomes, in some area, an athlete of God. Practice means to perform, over and over again in the face of all obstacles, some act of vision, of faith, of desire. Practice is a means of inviting the perfection desired.”
― Martha Graham
Sadly I have not been able to spend much time writing code, which I really enjoy.  I am working with people who code, reading their code, specifying requirements and on rare occasions doing code walk throughs.  
So I have decided to take it upon myself to "practice" coding everyday for the next 30 days.  My initial thoughts were to practice coding in EtoysJS or  lively-web and perhaps I will get there at some point.  But the pressures of work push me towards AngularJS at the moment so I will start there. That said I also intend to use this not just to practice programming but to explore other topics of interest such as how to teach programming.

Johann Sebastian Bach
“What I have achieved by industry and practice, anyone else with tolerable natural gift and ability can also achieve.”
― Johann Sebastian Bach

“For the things we have to learn before we can do them, we learn by doing them.”
― Aristotle, The Nicomachean Ethics

Friday, August 15, 2014

Gigascale Engineering talk by Bruno Bowden

Bruno Bowden (engineer on Google Earth, Enterprise Gmail) gave a great talk on "Gigascale Engineering"

He shared a lot of wisdom, which as the old saying goes, came from a lot of experience, which came from a lot of mistakes (including almost bringing down Gmail, messing up Eric Schmidt's email and having Santa Claus nearly cause an international incident.)

To summarize his points:
  1. The best decision is "Not to build"
    Learn to fail fast, give up and quit
  2. Recycle
    re-use, don’t re-invent the wheel.  Benefit from someone else's headaches and hard work.  Use something that's been battle tested, and someone  else has already worked through the bugs
  3. "Above the fold"
    Example he used was how one change, moving the download button up in the page so for certain displays with low resolution the download button could be seen w/o scrolling, increased the number of downloads of Google Earth by 50-100 million.
    My interpretation was find what will have the biggest impact.  Not what you think is will be cool or  interesting.

Then their was a really interesting section of the talk on "Pushing the reliability/Innovation curve". He showed how simple curve where the more innovation, the less reliability.  The "pushing" involves ways in which you can decrease risk which still increasing innovation. 

Below are a couple of the ideas he shared:
  • He talked about the basics such as Code Reviews.
  • He also mentioned that while Google "doesn't do TDD" all code is "guilty until proven innocent".   He stressed they do unit testing etc, they just haven't don't but into the "though shall always write tests first" approach.  My thought is that people trump process and TDD may add most value when used with less "experienced" developers to help them stay out of trouble.  That said I do like TDD, but frankly don't always practice it.
  • He mentioned that the number one threat to Google software was Google engineers.  And how they set Rate limits (throttling) to keep people from bringing systems to their knees
  • Using an exponential backoff strategy on retries to limit potential damage.  This reminded me of retry schemes for collision detection on Ethernet.  
  • Having built in "Real Time Controls" designed into the system to help you deal with performance issues
  • Having a way to safely/canary in the coal mine test knew code
  • Using N+2 Rollbacks
  • The advantage of "Keeping it Simple" and how engineers seem to love to create complexity.  A charge I have been guilty of way too many times.
  • He used a quote from John Dean "Design for 10x" which I understood as design for a 10 fold growth.
  • The earlier you can compartmentalize things the better before it becomes a Monolith
  • How when you first startup up you want to push things out as fast as possible and iterate quickly so you can find out what works (and hopefully abandon quickly what doesn't).  But once you start to scale you need to shift to a regular release cycle and a more repeatable process
  • Using protocol buffers to help deal with multiple versions of the protocol as you upgrade on a large multi-server environment.
  • Importance of managing your managements expectations.  Yes change is risky and when we do this there will be some fires (of course you go through the risk/reward analysis to determine its worth the fires that will happen).
  • What to do when failure happens (really important and unfortunately I see too many cases where this isn't handled properly or if they do the Post Mortem, the actions are not followed up on):
    • Alert Early - ie: don't hide the problem or cover it up.  Let people know so you can start to deal with it and get some help.
    • Escalate Response - Get some help, don't try and solve it all yourself, especially if its a potential crisis in production.
    • Stabilize - revert if necessary, but stabilize the system
    • Perform a Post Mortem - Ask "How can we avoid this in the future",  usually there are multiple points of failure.
    • Where could we have done more "Defensive Engineering"
    • Reassess the risks/rewards of what you are doing.
In addition to the wise advise there was a great story about how Santa Tracker almost caused an international incident, by flying over Toronto, Ohio (well he said some Toronto in the US, so I assume Ohio) as opposed to that other one in Canada.  Fortunately the Canadian general was kept sufficiently distracted so that he didn't look at the Santa Tracker until Mr. Claus got back on course.

Here is his Ted Talk on Santa Tracker:


Friday, February 28, 2014

[Confab] Circle-Square by Dy/Dan

Dan Meyer had posed a great problem on his blog

[Confab] Circle-Square

believe it originates from The Stanford Mathematics Problem Book, though I've seen it elsewhere in other forms.
Given an arbitrary point P on a line segment AB, let AP form the perimeter of a square and PB form the circumference of a circle. Find P such that the area of the square and circle are equal. 

 In it he posted one comment from Peter Boon (my emphasis added):
Off the ISDDE mailing list, Freudenthal Institute curriculum designer Peter Boon had some useful comments on the use of interactives and videos:
I would like to investigate the possibility of giving students tools that enable them to create those videos or something similar themselves. As a designer of technology-rich materials I often betray myself by keeping the nice math (necessary for constructing these interactive animations) for myself and leaving student with only the play button or sliders. I can imagine logo-like tools that enable students to create something like this and by doing so play with the concept variable as tools (and actually create a need for these tools).

Well for me Etoys is the tool of choice (not perfect, could be better, but a great choice).  Etoys is an educational tool for teaching children powerful ideas in compelling ways and a media-rich authoring environment and visual programming system for kids to create.  Besides logo like programming it hashas GeoGebra like functionality built in with DrGeo. But for this problem you don't even need Dr. Geo.

Below are the simple steps for kids to create a model of the problem.

1) Create a "Square" using the rectangle object. Below is a screen shot where I added one variable and a simple two line script.

2) Create a "Circle" using the Ellipse Object. Below is a screen shot again adding one variable and a simple two line script.
3) Now we need to create the line segment and showing the different segments.  Below is a screen shot of two Rectangle Objects and three simple scripts. Two to have the widths match the square's side and the circle's diameter and one to keep them aligned.

Plus kids can use Etoys to construct Multiplication Models, Explore Fractions and much much more. (See EtoysIllinois from the Office for Mathematics, Science, and Technology Education (MSTE) at the University of Illinois at Urbana-Champaign is a great resource)