|
eithedog posted:There's this: http://json-schema.org/, but as far as the W3C drafts go, I think this is the only mention: http://www.w3.org/community/odrl/work/json/ (http://tools.ietf.org/html/draft-zyp-json-schema-04) We're starting to use JSON (Hyper) Schema at work. It's like SOAP all over again, only with JSON The ability to consume a document and have an API client is really nice though as we start migrating to micro services. Although as we change communication protocols (currently all simply HTTP, but we're moving to some kind of bus) I'm not sure how it will work.
|
# ? Sep 3, 2014 17:59 |
|
|
# ? Jun 8, 2024 08:00 |
|
necrotic posted:We're starting to use JSON (Hyper) Schema at work. It's like SOAP all over again, only with JSON Kind of the wrong thread I know but what does a SOAP header actually provide? I always find it an annoyance, and I fail to see one useful thing it does that standard XML doesn't. I don't work with XML very often though so I don't have more than a glancing knowledge of pretty much what it looks like and a little bit of WPF stuff.
|
# ? Sep 3, 2014 20:09 |
|
Zamujasa posted:XML is nothing compared to the billion "I saw something using XML so I copied what it looked like" pseudo-XML files out there. How do I tell whether I'm doing XML right, then?
|
# ? Sep 3, 2014 20:26 |
|
Vanadium posted:How do I tell whether I'm doing XML right, then? Can you redefine id?
|
# ? Sep 3, 2014 20:45 |
|
Vanadium posted:How do I tell whether I'm doing XML right, then? Does a simple tuple with 1000 rows take up 1mb of hard disk space?
|
# ? Sep 3, 2014 22:09 |
|
Knyteguy posted:Kind of the wrong thread I know but what does a SOAP header actually provide? I always find it an annoyance, and I fail to see one useful thing it does that standard XML doesn't. I don't work with XML very often though so I don't have more than a glancing knowledge of pretty much what it looks like and a little bit of WPF stuff. SOAP with a WSDL that describes your API means someone can autogenerate methods in whatever language they want that knows how to talk to that API. Exposes the methods & data types, what not. When it works, it's a huge time saver. Put in (url to) WSDL and out comes a bunch of source files that you can include in your project.
|
# ? Sep 3, 2014 22:30 |
|
Vanadium posted:How do I tell whether I'm doing XML right, then?
|
# ? Sep 3, 2014 22:39 |
|
Update: I'm not doing xml right.
|
# ? Sep 3, 2014 22:56 |
|
Vanadium posted:Update: I'm not doing xml right. Bullet dodged.
|
# ? Sep 3, 2014 23:11 |
|
The proper way to do xml:code:
|
# ? Sep 3, 2014 23:53 |
|
crosspost from the noob jobs thread: The Fizz Buzz from Outer Space quote:Matteo recently interviewed a candidate that was employed elsewhere as an “architect”. His responses to the standard soft-skills questions sounded a bit rehearsed, which made Matteo suspicious, so he started asking some more technical questions, like: “What’s the difference between an interface and an abstract class?”
|
# ? Sep 4, 2014 00:20 |
|
Literally Elvis posted:crosspost from the noob jobs thread: Sounds just like the architects at my company.
|
# ? Sep 4, 2014 00:23 |
|
Literally Elvis posted:crosspost from the noob jobs thread: I read the comments, I loved this one - reminds me of previous roles.... quote:FizzBuzzFactoryBeanFactoryBeanManagerBeanFactoryBeanBeanFactory
|
# ? Sep 4, 2014 07:08 |
|
TheresaJayne posted:I read the comments, I loved this one - reminds me of previous roles.... from my memory and the comments it seems: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
|
# ? Sep 4, 2014 07:39 |
|
TheresaJayne posted:I read the comments, I loved this one - reminds me of previous roles.... I felt inspired to write this: Python code:
|
# ? Sep 4, 2014 07:57 |
|
ShadowHawk posted:I felt inspired to write this: The OCD in me is sad that it's not buzziness
|
# ? Sep 4, 2014 08:41 |
|
Zamujasa posted:XML is nothing compared to the billion "I saw something using XML so I copied what it looked like" pseudo-XML files out there. EDIT: What really bothers me about this is that in all of these cases, the people involved would have been better served to just use a simple ini-file style text file to store their key-value pairs or, if they just HAD to use XML for whatever reason, to just pick any of the vast number of existing XML libraries out there and use that but no, they just had to go and write their own (typically regexp-based) angle-bracket parser and call that bit of cargo cult programming "XML." PrBacterio fucked around with this message at 15:34 on Sep 4, 2014 |
# ? Sep 4, 2014 15:28 |
|
If you make the same off-by-one error on both sides of a comparison, is it still an error?code:
|
# ? Sep 4, 2014 17:23 |
|
dwazegek posted:If you make the same off-by-one error on both sides of a comparison, is it still an error? Looks completely reasonable to me
|
# ? Sep 4, 2014 17:42 |
|
code:
|
# ? Sep 4, 2014 17:50 |
|
Steve French posted:Looks completely reasonable to me Yeah, I should've provided more context. There were a few legitimate off-by-one errors in related code where the (inclusive) upper bounds of the range was repeatedly calculated by doing start+length. I'm pretty sure the same buggy code was copy/pasted when writing this code, but because it's balanced on both sides of the comparison, it works.
|
# ? Sep 4, 2014 17:55 |
|
I have no idea how the ranges are being used but for something like addressing ranges in an array wouldn't inner.Start + inner.Length overflow even though inner.Start + inner.Length - 1 could still be valid?
|
# ? Sep 4, 2014 17:56 |
|
C# code:
|
# ? Sep 4, 2014 18:33 |
|
1337JiveTurkey posted:I have no idea how the ranges are being used but for something like addressing ranges in an array wouldn't inner.Start + inner.Length overflow even though inner.Start + inner.Length - 1 could still be valid? Not clear if Start is a pointer or just an index. I read it as an index, in which case there is no problem. If it is a pointer, then, well, we have already had that long conversation.
|
# ? Sep 4, 2014 18:41 |
|
PrBacterio posted:That's actually the worst part about XML, yes, but I'd argue that it's a flaw of XML itself. I've seen this happen way too many times, with the people doing it refusing to back down even when called out on it -- "what? you're writing your own XML parser? have fun implementing all the details of that convoluted several-hundred-pages standards document - oh, you're not? well then it's not really XML, is it? -- 'stop bothering me, sperg, it too is XML! it uses angle brackets, see! just because I don't follow the standard doesn't mean it isn't XML, anything that uses angle brackets is XML and if you disagree you're a sperg, you sperg!!!'". The best part is that one of the services we work with uses pseudo-XML, while also reserving 0a and 0d as the start and end characters of a packet.
|
# ? Sep 4, 2014 19:00 |
|
We have an XML-like format in one of our products. It has to support boolean expressions, and we leave < and > unquoted. It works fine with out custom-built parser (partly because there's only a small number of valid tag names). I'm fairly certain our philosophy is "if it ain't too broken, don't fix it."
|
# ? Sep 4, 2014 19:02 |
|
1337JiveTurkey posted:I have no idea how the ranges are being used but for something like addressing ranges in an array wouldn't inner.Start + inner.Length overflow even though inner.Start + inner.Length - 1 could still be valid? I can't give any specifics, but there's no danger of overflowing. Both numbers are 32 bit integers, are always positive, and the maximum upper bound is never going to be more than 10 million.
|
# ? Sep 4, 2014 19:15 |
|
One time I hand-parsed XML in LabVIEW.
|
# ? Sep 4, 2014 19:17 |
|
Knyteguy posted:
It isn't as if C# doesn't encourage some Hungarian notation with its IAmAnInterface and TisType. It could be easy for a WinAPI programmer to slip into that habit. However, the rest of that is spot on. HFX fucked around with this message at 19:22 on Sep 4, 2014 |
# ? Sep 4, 2014 19:17 |
|
Zamujasa posted:The best part is that one of the services we work with uses pseudo-XML, while also reserving 0a and 0d as the start and end characters of a packet. As far as XML horrors go, the biggest one I've had to deal with was document as: code:
|
# ? Sep 4, 2014 21:22 |
|
eithedog posted:As far as XML horrors go, the biggest one I've had to deal with was document as: Well, you need XML Professional Edition to get CDATA support.
|
# ? Sep 4, 2014 21:29 |
|
eithedog posted:The details are hazy and I don't really remember why it was done this way, but yup, the entire content of the one node was entity encoded XML document, which had to be parsed.
|
# ? Sep 4, 2014 21:30 |
|
eithedog posted:The OCD in me is sad that it's not buzziness
|
# ? Sep 4, 2014 21:42 |
|
Is it a horror that I now read "#region ..." as "hashtag region"?
|
# ? Sep 4, 2014 22:08 |
|
eithedog posted:As far as XML horrors go, the biggest one I've had to deal with was document as: Not to mention the < and > were flipped.
|
# ? Sep 4, 2014 22:19 |
|
Deus Rex posted:Not to mention the < and > were flipped. Ups, my mistake - the > and < were in correct places.
|
# ? Sep 4, 2014 22:40 |
|
Knyteguy posted:Kind of the wrong thread I know but what does a SOAP header actually provide? I always find it an annoyance, and I fail to see one useful thing it does that standard XML doesn't. I don't work with XML very often though so I don't have more than a glancing knowledge of pretty much what it looks like and a little bit of WPF stuff. The basic idea is your SOAP WSDL can be consumed by some client and then it automatically knows how to use your API (what calls you can make, what arguments they accept, and what they return). This allows you to define the API once and then subsequently use it in any language (that has a way to consume the WSDL). edit: Missed Snapchat A Titty's reply, whoops!
|
# ? Sep 5, 2014 00:08 |
|
.
Nickopops fucked around with this message at 09:28 on Nov 1, 2019 |
# ? Sep 5, 2014 00:12 |
|
Nickopops posted:Also teaching first year university students Python is fun. Comments are denoted by a hashtag!
|
# ? Sep 5, 2014 00:32 |
|
|
# ? Jun 8, 2024 08:00 |
|
Rust attributes #[look_like_this] and I've unsuccessfully attempted to make them drop the brackets and make attributes postfix.
|
# ? Sep 5, 2014 00:51 |