Using the automigrate sample code from near the end of the page at http://loopback.io/doc/en/lb3/Creating-a-database-schema-from-models.html I received back the text
This turns out to be from the console.log line that includes ‘-‘ (minus) signs in the line
console.log('Loopback tables [' - lbTables - '] created in ', ds.adapter.name);
using instead ‘+’ signs as in the following seemed to work
console.log('Loopback tables [' + lbTables + '] created in ', ds.adapter.name);
I’ve been trying the Marko templating engine and was seeing the message
Waited 1500ms without receiving "online" from child process
on starting up the app with either browser-refresh or with node server.js. Turns out that was just due to my MacBook Pro being old and slow. The tortoise still ran the code just not as quickly as expected.
The more significant problem I was facing was that
browser-refresh wasn’t doing a browser refresh
as intended when I changed source code. This was driving me nuts going round in circles trying to understand this new technology in a language in which I wasn’t particularly familiar. Magic was at work and the tricks weren’t quite working. Worse was I couldn’t work out how to fix them.
I asked on gitter.im about the problem and, much to my surprise and absolute delight, the author of Marko, Patrick Steele-Idem answered. What’s more he took the time to troubleshoot the problem. I was fairly sure it would be something simple but the troubleshooting went deep into the cache refresh mechanism – illuminating and ultimately fruitful. Case sensitivity was the problem – as simple as that! The cache was being cleared of a file with a lower case name in the path whilst the file being retrieved for the browser had mixed case. Answer: use lower case with underscore in paths and filenames (and I’m quoting Patrick Steele-Idem here).
Now I’m underway again trialling Marko as part of a possible technology stack I’m exploring.
I’ve put together a tool to generate a PDF from a set of Trello cards. The tool is at http://pdf-from-trello.meteor.com/ and with it you connect to Trello, choose your list and download the PDF. Connecting to Trello means clicking a button on a form that pops up to authorise the tool to retrieve data from your Trello account. The download consists of the card name as a heading and the card description as paragraphs below the heading. I used to produce a product description document from a set of cards I created with a team. Please do let me know what you think of it and the use to which you put it.
I wanted to add code coverage to help me spot additional tests to write. Jacoco4sbt came up in the Google searches as the most likely solution to use. After a first attempt which just didn’t look promising I eradicated Jacoco from my project. I decided to try again after a while and, hey presto, it worked!
The two vital ingredients were:
addSbtPlugin("de.johoop" % "jacoco4sbt" % "2.1.6")
to project/plugins.sbt and
to build.sbt plus I wanted jacoco to use my testing configuration file.
testOptions in jacoco.Config += Tests.Setup( () => System.setProperty("config.file", "conf/testing.conf") )
parallelExecution in jacoco.Config := false
to build.sbt as well, with the blank lines included like that.
Then I ran
When I saw the test debug log output in the application.log file I was most surprised and delighted.
Stop shouting at me
Are you a drunk
an angry driver
in mortal danger at the cliff’s edge
No, I’m three
and I just want it now
Stop shouting at me
I’m learning from you
and I’m failing to learn from you
Why are we shouting
I just want it now
Stop shouting at me
Why don’t you hear me
Why don’t you notice me
I’m only three
But this all me, right now
and I want it now
(written probably in 2010)
and more recently this one made some very good points:
I found this article vocalised some of my thoughts very well: