Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
code-faster
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
61.
▲
Mastering jq: XML (and any other data format)
(codefaster.substack.com)
2 points
by
code-faster
6y ago
|
0 comments
62.
▲
by
code-faster
6y ago
Hard: Tech Harder: People Impossibly hard: Help people get faster at building tech And yet it's all I want to do. https://codefaster.substack.com
63.
▲
by
code-faster
6y ago
Is there anything in my tutorial that I can help clarify for you?
64.
▲
by
code-faster
6y ago
Nice! I've found xml transforms is one of the best applications of jq (yes, jq, not xq). In a future post, I'll cover how to use jq not just for json and xml but any data format.
65.
▲
by
code-faster
6y ago
You can use any language with json support, which is most languages. In python, you can have a jq like experience with def f(data): # put code here data = json.load(sys.stdin) output = f(data) print(json.dumps(output))
66.
▲
by
code-faster
6y ago
It is a weird way to write it, I never use this notation for myself. When teaching though, I'd rather make the it more visually explicit that jq commands are a sequence of filters. With the former notation, a | explicitly tells the rea
67.
▲
by
code-faster
6y ago
I would also be fascinated to hear how you're using it.
68.
▲
by
code-faster
6y ago
Thanks for flagging that, they've been fixed and retested, thank you jbotz!
69.
▲
Mastering Jq: Part 1
(codefaster.substack.com)
205 points
by
code-faster
6y ago
|
72 comments
70.
▲
Track Your TODOs
(codefaster.substack.com)
1 points
by
code-faster
6y ago
|
0 comments
71.
▲
by
code-faster
6y ago
my json toolkit has been a huge boon for me, it complements jq very well: https://github.com/tyleradams/json-toolkit There's tools for converting between json and other data formats like xml as well as misc tools
72.
▲
Printf Debugging
(codefaster.substack.com)
1 points
by
code-faster
6y ago
|
0 comments
73.
▲
by
code-faster
6y ago
Ah, they're meant to be xml fragments, not full xml documents. In my limited experience I haven't seen people use the <array> container and the xml parser still works, although it is a good idea.
74.
▲
by
code-faster
6y ago
Posting both on your own blog and others is called "blog syndication", it's a common practice that's googleable.
75.
▲
XML Is Not Injective
(codefaster.substack.com)
3 points
by
code-faster
6y ago
|
4 comments
76.
▲
by
code-faster
6y ago
Yeah, but computer performance isn't a bottleneck in most applications, engineer performance is.
77.
▲
by
code-faster
6y ago
Agreed. If a cable plugs in it should "work", and all usb c cables "work". I can use a crappy usb c cable to charge my laptop. The issue is that how "well" the cable works varies wildly and is not visually dete
78.
▲
by
code-faster
6y ago
yeah a 2d logo on the connector or a cable pattern is better, good call.
79.
▲
by
code-faster
6y ago
There has to be a post-mortem on this. My take is that the standard is too lenient and the cables aren't color coded. Lenient standards mean that "usb-c" could support 1W or 10W and your phone plays footsy to figure out how h
80.
▲
by
code-faster
6y ago
Your standards make you valuable and you're wasting your potential at $current_company. Find a new job.
81.
▲
by
code-faster
6y ago
The central point that work trackers track work is true important and jira astronauts need to be stopped, but the piece misses the bureaucratic purpose of jira: work legibility. Work tracking isn't just about figuring out what work nee
82.
▲
by
code-faster
6y ago
1 - Create an online portfolio on LinkedIn. Don't worry about what's on it, just make it. Keep it updated. 2 - Log hours programming whatever it is you like programming to build your resume and skills. Since you need money and you
83.
▲
by
code-faster
6y ago
It's less that pipelines are friction, they're really not. It's more that people like building features and people don't like saying no to features. The original unix guys had a rare culture that was happy to knock off u
84.
▲
by
code-faster
6y ago
Rewriting has a concave payoff. It requires high levels of certainty to be valuable. The bigger the rewrite, the more likely you're less certain than you think. Refactoring is the same as rewriting, just on a smaller scale, which incre
85.
▲
Make JSON your lingua franca
(codefaster.substack.com)
1 points
by
code-faster
6y ago
|
2 comments
86.
▲
by
code-faster
6y ago
Immeasurable model risk When convex this is good When concave this is bad So if all else is equal, the convexity breaks the tie.
87.
▲
by
code-faster
6y ago
This only holds in convex payoff distributions where risk has a positive expected value. In concave payoff distributions, where risk has a negative expected value, inaction is favored.
88.
▲
Stop Messing with Time
(codefaster.substack.com)
1 points
by
code-faster
6y ago
|
0 comments
89.
▲
by
code-faster
6y ago
I've used a similar technique to test, generating an expected output, actual output and then diff them. One trick I found helpful was using JSON to serialize test results instead of unstructured plain text. Test results stored as JSON
90.
▲
Pick Straightforward Test Data
(codefaster.substack.com)
1 points
by
code-faster
6y ago
|
0 comments
More ›