I was playing with Polymer at work, building a service monitor with it. At some point I needed charts and Flot seemed to be the simplest solution.
So after a little work I managed to wrap Flot for Polymer (on GitHub). ?
I was playing with Polymer at work, building a service monitor with it. At some point I needed charts and Flot seemed to be the simplest solution.
So after a little work I managed to wrap Flot for Polymer (on GitHub). ?
If you use Python‘s Bottle micro-framework there’ll be a time where you’ll want to add custom plugins. To get a better feeling on what code gets executed when, I created a minimal Bottle app with a test plugin that logs what code gets executed. I uesed it to test both global and route-specific plugins.
When Python loads the module you’ll see that the plugins’
__init__()
and
setup()
methods will be called immediately when they are installed on the app or applied to the route. This happens in the order they appear in the code. Then the app is started.
The first time a route is called Bottle executes the plugins’
apply()
methods. This happens in “reversed order” of installation (which makes sense for a nested callback chain). This means first the route-specific plugins get applied then the global ones. Their result is cached, i.e. only the inner/wrapped function is executed from here on out.
Then for every request the
apply()
method’s inner function is executed. This happens in the “original” order again.
Below you can see the code and example logs for two requests. You can also clone the Gist and do your own experiments.
https://twitter.com/riyadpr/status/617681143538786304
Updating my OnePlus One recently to Cyanogen OS 12 I had to reset my phone a few times before everything ran smoothly … so I wrote a pair of scripts to help me copy things around.
It uses the Android SDK’s ADB tool to do the copying since the Android File Transfer Tool for Mac has a laughable quality for Google’s standards.
Update 2018-11-22:
Since the scripts became more sophisticated I moved them to a proper project on GitHub.
This is an awesome talk that compares software to music and explores why 400+-year-old music can still be played … in different keys … on a variety of instruments … etc.
Gary Bernhardt presents a thought-provoking history of JavaScript as seen from 2035.
His arguments are that
So by further moving the JavaScript VM into the kernel we save ourselves the overhead of hardware process isolation as the VM does this any way.
All this lead to interesting consequences
:’D
Very entertaining talk about some of Ruby‘s quirks. 😀
Researchers seemingly have found a way to tell-apart students which will do well in computer science classes and those who won’t. More eloquently put they’ve devised a way “[to] separate programming sheep from non-programming goats.” 😀
And they come to an interesting conclusion:
Formal logical proofs, and therefore programs – formal logical proofs that particular computations are possible, expressed in a formal system called a programming language – are utterly meaningless. To write a computer program you have to come to terms with this, to accept that whatever you might want the program to mean, the machine will blindly follow its meaningless rules and come to some meaningless conclusion. In the test the consistent group showed a pre-acceptance of this fact: they are capable of seeing mathematical calculation problems in terms of rules, and can follow those rules wheresoever they may lead. The inconsistent group, on the other hand, looks for meaning where it is not. The blank group knows that it is looking at meaninglessness, and refuses to deal with it.
— Saeed Dehnadi and Richard Bornat, 2006, “The camel has two humps (working title)”
I have accepted it. -.-
Just found a nice trick on TUAW on how to make the OS X Activity Monitor show graphs in place of its app icon.
During PyCon 2014 Erik Rose gave a very insightful talk about dos and don’ts of designing APIs. Towards the end he “gets meta” and groups all his points into categories drawing connections how different design goals influence each other. You see two main groups–”lingual” and “mathematical”–and he closes with this gem: 😀
This spotlights something that programming languages have over ordinary human languages. Programs are alive! They not only mean things when people read them, but they actually do things when run. So, very literally a program with carefully chosen symbols is poetry in motion.
— Erik Rose (PyCon 2014)
https://youtu.be/JQYnFyG7A8c