<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>One More Blog - Latest Comments</title><link>http://ericmoritz.disqus.com/</link><description></description><atom:link href="https://ericmoritz.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 27 Nov 2019 11:49:54 -0000</lastBuildDate><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-4704494696</link><description>&lt;p&gt;Here's my use case. I have a set of HTTP services. They usually have the form https://.../{resource}/{id}/{property}. Note that {resource}/{id} is not something stored in a database; the ids are natural ids. They fit the REST model reasonably well and I wanted to add some HATEOAS. Today we had a use case for someone accessing /{resource}/{id} (one of our POST services will return that as the Location URL of the "created" resource). And I wanted to have that return data giving a few trivial-to-compute properties and links to the other properties in a form that a developer who follows that link can understand. So, if I have widget/foobar, I wanted to have it include links like "hardness": "https://..../widget/foobar/hardness". However, HAL does not seem to be widely used and JSON-LD is still supported after a decade. So I was looking into it. However, even after reading this and spending an hour looking at it trying to write the spec for my developers, I don't see how &lt;code&gt;&lt;br&gt;{&lt;br&gt;  "method": "PUT",&lt;br&gt;   "expects": {&lt;br&gt;      "@id": "BlogPost",&lt;br&gt;      "supportedProperty": [&lt;br&gt;        {"@id": "name", "required": true},&lt;br&gt;        {"@id": "body"}&lt;br&gt;      ]&lt;br&gt;   }&lt;br&gt;}&lt;br&gt;&lt;/code&gt; lets me do that. I don't see a URL in there anywhere. (Note that the concepts for these links are not in any standard controlled vocabulary I'm aware of.)&lt;/p&gt;&lt;p&gt;This is an ancient post. But I'm writing this here in case someone associated with the standard should read it and incorporate it into future understanding.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric</dc:creator><pubDate>Wed, 27 Nov 2019 11:49:54 -0000</pubDate></item><item><title>Re: Eric Moritz - Python Encodings and Unicode</title><link>http://eric.themoritzfamily.com/python-encodings-and-unicode.html#comment-2857029707</link><description>&lt;p&gt;For unix based it is ok but under windows encoding to utf-8 doesn't solve the problem.&lt;/p&gt;&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; u = u"abc\u2013"&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; print u.encode("utf-8")&lt;br&gt;abcÔÇô&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; print u&lt;br&gt;Traceback (most recent call last):&lt;br&gt;  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;br&gt;  File "C:\python27\lib\encodings\&lt;a href="http://cp857.py" rel="nofollow noopener" target="_blank" title="cp857.py"&gt;cp857.py&lt;/a&gt;", line 12, in encode&lt;br&gt;    return codecs.charmap_encode(input,errors,encoding_map)&lt;br&gt;UnicodeEncodeError: 'charmap' codec can't encode character u'\u2013' in position 3: character maps to &amp;lt;undefined&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mesut Güneş</dc:creator><pubDate>Wed, 24 Aug 2016 10:02:50 -0000</pubDate></item><item><title>Re: Eric Moritz - Websocket Demo Results V2</title><link>http://eric.themoritzfamily.com/websocket-demo-results-v2.html#comment-2398897298</link><description>&lt;p&gt;Hey, man, great stuff. Are these benchmarks still relevant today?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Justin Rudio</dc:creator><pubDate>Mon, 07 Dec 2015 21:24:15 -0000</pubDate></item><item><title>Re: Understanding PSQL&amp;#39;s MVCC | One More Blog</title><link>http://eric.themoritzfamily.com/understanding-psqls-mvcc.html#comment-2134266873</link><description>&lt;p&gt;Readers should be aware that newer versions of Postgres now have 3 effective isolation levels; COMMITTED, REPEATABLE READ, and SERIALIZABLE. The current docs (&lt;a href="http://www.postgresql.org/docs/current/static/transaction-iso.html#MVCC-ISOLEVEL-TABLE)" rel="nofollow noopener" target="_blank" title="http://www.postgresql.org/docs/current/static/transaction-iso.html#MVCC-ISOLEVEL-TABLE)"&gt;http://www.postgresql.org/d...&lt;/a&gt; spell out the differences.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim Nasby</dc:creator><pubDate>Mon, 13 Jul 2015 17:31:38 -0000</pubDate></item><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-2038969258</link><description>&lt;p&gt;so in stage 1 @context is left off to define properties as URIs linked to primary keys in an array so later you can link them to domain &lt;br&gt;names in a lookup table?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Farsoonerite</dc:creator><pubDate>Fri, 22 May 2015 03:44:14 -0000</pubDate></item><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-2037001320</link><description>&lt;p&gt;OK great, I'll try it out and let you know what I think.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Farsoonerite</dc:creator><pubDate>Thu, 21 May 2015 02:14:21 -0000</pubDate></item><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-2036952307</link><description>&lt;p&gt;I think I get what you're saying, the @ symbol is like the new anchor tag so you're looking at a staged approach to investigate the value of linking documents and data together in this way. At first based on what I had learned up until now it hadn't even occurred to me that the Hydra vocabulary could still be useful without a URL look-up table mapped to the properties but I see the value in a gradual approach. While I can't speak for other hypermedia applications I do see immediate value for @context and lots of potential growth for linked data in b2b markets specializing in Enterprise level APIs. With lots of former developers working in that space who've learned painful lessons from their SOAP days now looking to move on to greener pastures. Where reusable linked data resources w/properties mapped to generic URL look-up tables would solve a lot of headaches.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Farsoonerite</dc:creator><pubDate>Thu, 21 May 2015 01:08:52 -0000</pubDate></item><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-2032950661</link><description>&lt;p&gt;In all honesty, I did argue to ignore the `@context` of JSON-LD for Hydra Lite.  I made it optional and I would think that folks in the market for hypermedia are not in the market for Linked Data just yet.  As valuable as Linked Data is, it is intimidating to people who don't understand it's value.&lt;/p&gt;&lt;p&gt;My goal was to give people just enough JSON-LD and Hydra to get them started without too much intimidation.   I feel like we're at the transition in hypermedia services where we were transitioning from FTP to HTML.  i.e. static unlinked documents vs linked documents.  We're just learning about the value of equivalent of &amp;lt;a&amp;gt; tags.  I bet in a years time we'll be so bored with links in JSON because they're used everywhere.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ericmoritz</dc:creator><pubDate>Mon, 18 May 2015 22:23:37 -0000</pubDate></item><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-2032924444</link><description>&lt;p&gt;I think what I presented here would be the bare minimum you'd need to be able to describe the links in your service.  There are a number of properties that lets you more specifically declare your operations, such as the `statusCode` property.  Another thing I left out were Hydra's Collection classes.&lt;/p&gt;&lt;p&gt;These are a hydra standard way to describe a collection of members.  This may be valuable for an automated client to have a common way to page through a collection.&lt;/p&gt;&lt;p&gt;One thing I realized that I left out were templated links.  These are valuable if you have resources that take query parameters.  See &lt;a href="http://eric.themoritzfamily.com/linking-in-hydra.html" rel="nofollow noopener" target="_blank" title="http://eric.themoritzfamily.com/linking-in-hydra.html"&gt;http://eric.themoritzfamily...&lt;/a&gt; for an example of a templated link.&lt;/p&gt;&lt;p&gt;If you're writing a service using JSON-LD, I'd love to get your opinion on my module I wrote to help write JSON-LD based services: &lt;a href="https://www.npmjs.com/package/jsonld-dsl" rel="nofollow noopener" target="_blank" title="https://www.npmjs.com/package/jsonld-dsl"&gt;https://www.npmjs.com/packa...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ericmoritz</dc:creator><pubDate>Mon, 18 May 2015 22:02:58 -0000</pubDate></item><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-2032889385</link><description>&lt;p&gt;If this is the Mike Kelly who developed HAL first off well done on creating a simple, intuitive set of rules for using hyperlinks in plain JSON. I think HAL is great for simple single developer API implementations but does fall short of achieving the aim of wider universal API adoption set out by the true concept of linked data. The writing is on the wall, the future means more interop between APIs necessitating the use of more standards.&lt;/p&gt;&lt;p&gt;Your comment also seems to confuse JSON-LD and Hydra, they're two different things. He's not stripping down JSON-LD here, Hydra is like a JSON-LD add on. Think of JSON-LD as RDF for  JSON key/value pairs, making all the data in JSON processable, not only just the  hyperlinks.&lt;/p&gt;&lt;p&gt;As for Hydra think of that as doing for Web APIs  what &lt;a href="http://Schema.org" rel="nofollow noopener" target="_blank" title="Schema.org"&gt;Schema.org&lt;/a&gt; did for microdata and RDF.  A very powerful idea when  Hydra is used in conjunction with the new JSON "smart document" format. So Hydra  integration into JSON-LD is optional, and is there only if you are making your API RESTful. One can imagine other solutions to Hypermedia other than Hydra which can plug into the JSON-LD standard the same way. Adding even higher  levels of complexity to the real notion of universally understood Linked Data. Which it seems is being addressed here.&lt;/p&gt;&lt;p&gt;I look forward to evaluating this project and seeing if I can integrate it into my node project. Thanks again to the author!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Farsoonerite</dc:creator><pubDate>Mon, 18 May 2015 21:34:31 -0000</pubDate></item><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-2032879491</link><description>&lt;p&gt;Well done! I've been looking into this technology for the past few months now and I've finally decided to take the plunge and architect my first Hydra Hypermedia APIs w/JSON-LD. I'm using Node.js so your project looks like good entry point. What I'm wondering though is, what am I missing if I just have access to Hydra Operations? Could you say what you left out from Hydra and why?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Farsoonerite</dc:creator><pubDate>Mon, 18 May 2015 21:26:16 -0000</pubDate></item><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-2002410117</link><description>&lt;p&gt;Sorry, my intent wasn't to prove HAL better or worse than my proposal.  If you find HAL valuable, use it.  I presented HAL as a point of contrast, not to prove it worse than JSON-LD.  My goal wasn't to dumb down JSON-LD but rather to pick a subset of JSON-LD that would have feature parity with HAL and other hypermedia standards.&lt;/p&gt;&lt;p&gt;While I am completely on board with the Linked Data movement and the benefits of disambiguation and providing shared vocabularies, many have argued that it is a solution looking for a problem. It is hard not to sound like a religious zealot when extolling the virtues of Linked Data. I saw this subset as a pragmatic use of JSON-LD that feels more natural to JSON developers and easier to apply to existing RESTful services.&lt;/p&gt;&lt;p&gt;HAL can be applied to existing services, but I see the whole _links/_embedded design problematic to extensibility which I mentioned in the article.  In addition, existing services that already have embedded objects have to break backwards compatibility and move the embedded objects under the _embedded field or bloat the response by duplicating the object.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ericmoritz</dc:creator><pubDate>Mon, 04 May 2015 10:40:48 -0000</pubDate></item><item><title>Re: Eric Moritz - Hydra lite</title><link>http://eric.themoritzfamily.com/hydra-lite.html#comment-1999115773</link><description>&lt;p&gt;It seems a bit much to claim this is objectively better than HAL. It's interesting that JSON-LD needs additional stripping down in order to make it palletable for developers. In the end though, it sounds like it might be easier to just accept the will of the team and use HAL rather than attempt to unofficially dumb down JSON-LD.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mike Kelly</dc:creator><pubDate>Sat, 02 May 2015 04:57:19 -0000</pubDate></item><item><title>Re: Eric Moritz - Learning Python Logging</title><link>http://eric.themoritzfamily.com/drafts/learning-python-logging.html#comment-1564433610</link><description>&lt;p&gt;Thank you very much for the article!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dewsworld</dc:creator><pubDate>Fri, 29 Aug 2014 02:16:12 -0000</pubDate></item><item><title>Re: Understanding PSQL&amp;#39;s MVCC | One More Blog</title><link>http://eric.themoritzfamily.com/understanding-psqls-mvcc.html#comment-1085533512</link><description>&lt;p&gt;In READ COMMITTED, both non-repeatable and phantom reads are possible as per the Doc.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">TRaghav</dc:creator><pubDate>Thu, 17 Oct 2013 05:58:22 -0000</pubDate></item><item><title>Re: Eric Moritz - Learning Python Logging</title><link>http://eric.themoritzfamily.com/drafts/learning-python-logging.html#comment-977889028</link><description>&lt;p&gt;You'll have to try this out but as I remember it; basicConfig serves as the default config for the root logger.  Calling it twice will reconfigure it.&lt;/p&gt;&lt;p&gt;What I would suggest is have one logger in &lt;a href="http://master.py" rel="nofollow noopener" target="_blank" title="master.py"&gt;master.py&lt;/a&gt; called "master", i.e. log = logging.getLogger("master") and in &lt;a href="http://slave.py" rel="nofollow noopener" target="_blank" title="slave.py"&gt;slave.py&lt;/a&gt; a logger called "slave".  In &lt;a href="http://master.py" rel="nofollow noopener" target="_blank" title="master.py"&gt;master.py&lt;/a&gt; configure the handler for "master" such that it logs to master.log and the handler for "slave" so that it logs to "slave.log" at level INFO and "slave_detailed.log" at level DEBUG.&lt;/p&gt;&lt;p&gt;You'll have to consult the logging docs on how to do that but should be easy to do.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ericmoritz</dc:creator><pubDate>Fri, 26 Jul 2013 19:49:43 -0000</pubDate></item><item><title>Re: Eric Moritz - Learning Python Logging</title><link>http://eric.themoritzfamily.com/drafts/learning-python-logging.html#comment-977735436</link><description>&lt;p&gt;I have two Python scripts. e.g. &lt;a href="http://slave.py" rel="nofollow noopener" target="_blank" title="slave.py"&gt;slave.py&lt;/a&gt; and &lt;a href="http://master.py" rel="nofollow noopener" target="_blank" title="master.py"&gt;master.py&lt;/a&gt;. Master is the one I run (or double click) to launch my whole thing. Inside of &lt;a href="http://master.py" rel="nofollow noopener" target="_blank" title="master.py"&gt;master.py&lt;/a&gt; I make a call to &lt;a href="http://slave.py" rel="nofollow noopener" target="_blank" title="slave.py"&gt;slave.py&lt;/a&gt; just once (I suppose that makes &lt;a href="http://slave.py" rel="nofollow noopener" target="_blank" title="slave.py"&gt;slave.py&lt;/a&gt; a module). &lt;br&gt;a) Where should my logging.basicConfig() be given that: I have stuff that I want to get logged in a master.log file and others that I want to be logged in a slave.log file and finally more data that I want to be logged in slave_detailed.log file.&lt;br&gt;b) Is it ok to have a logging.basicConfig() line in slave.log and another in master.log?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brad</dc:creator><pubDate>Fri, 26 Jul 2013 17:01:38 -0000</pubDate></item><item><title>Re: Understanding PSQL&amp;#39;s MVCC | One More Blog</title><link>http://eric.themoritzfamily.com/understanding-psqls-mvcc.html#comment-843092858</link><description>&lt;p&gt;Hey Moritz, What's up buddy. I was just Googling MVCC and PostreSQL backups for a newsletter subscriber database backup nightly task over here at the networks. I was afraid pg_dump would lock my tables, whereas keeping my opt-outs from being logged or honored and making us no longer compliant with CanSpam. But from what I've found, and from what you've said here - MVCC prevents this from happening. Cheers!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Austin</dc:creator><pubDate>Tue, 26 Mar 2013 13:27:58 -0000</pubDate></item><item><title>Re: Eric Moritz - Websocket Demo Results V2</title><link>http://eric.themoritzfamily.com/websocket-demo-results-v2.html#comment-775670384</link><description>&lt;p&gt;Can you attempt this test on rackspace cloud? Also will be intresting to know if a dedicated box performs differently to a cloud/virtual platform.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">guest</dc:creator><pubDate>Wed, 23 Jan 2013 09:41:26 -0000</pubDate></item><item><title>Re: Eric Moritz - Learning Python Logging</title><link>http://eric.themoritzfamily.com/drafts/learning-python-logging.html#comment-728933988</link><description>&lt;p&gt;it's hard to say without seeing how you've configured logging.  If you put your logging configuration code up on &lt;a href="http://gists.github.com" rel="nofollow noopener" target="_blank" title="gists.github.com"&gt;gists.github.com&lt;/a&gt; and I could take a look.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ericmoritz</dc:creator><pubDate>Thu, 06 Dec 2012 00:09:43 -0000</pubDate></item><item><title>Re: Eric Moritz - Learning Python Logging</title><link>http://eric.themoritzfamily.com/drafts/learning-python-logging.html#comment-728502138</link><description>&lt;p&gt;Very nice explanation, thanks. I have a situation where script has to generate several log files, the only thing the root logging always add whatever it has to the other log files. Can you suggest anything? &lt;br&gt;  &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mmakh22</dc:creator><pubDate>Wed, 05 Dec 2012 13:01:53 -0000</pubDate></item><item><title>Re: Eric Moritz - Books every self-taught computer scientist should read</title><link>http://eric.themoritzfamily.com/books-every-self-taught-computer-scientist-should-read.html#comment-596398732</link><description>&lt;p&gt;don't forget to learn how to write not just a code but a clear code"Code Complete","Clean code a handbook of agile software craftsmanship"&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andrew</dc:creator><pubDate>Tue, 24 Jul 2012 10:28:03 -0000</pubDate></item><item><title>Re: Eric Moritz - Python Encodings and Unicode</title><link>http://eric.themoritzfamily.com/python-encodings-and-unicode.html#comment-572938767</link><description>&lt;p&gt;nice there is also a very nice pycon 2012 talk on this topic I recommend watching that to the readers of this interesting article&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kourosh</dc:creator><pubDate>Sat, 30 Jun 2012 08:55:09 -0000</pubDate></item><item><title>Re: Eric Moritz - Python Encodings and Unicode</title><link>http://eric.themoritzfamily.com/python-encodings-and-unicode.html#comment-526667980</link><description>&lt;p&gt;Thank you taking the time to explain Unicode, ASCII, etc. Very helpful!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brent O'Connor</dc:creator><pubDate>Fri, 11 May 2012 16:22:49 -0000</pubDate></item><item><title>Re: Eric Moritz - Books every self-taught computer scientist should read</title><link>http://eric.themoritzfamily.com/books-every-self-taught-computer-scientist-should-read.html#comment-516290190</link><description>&lt;p&gt; No he is not.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Abdul Bijur Vallarkodath</dc:creator><pubDate>Wed, 02 May 2012 05:13:00 -0000</pubDate></item></channel></rss>