Better HN
topnewbestaskshowjobs
Log inSign up

code-faster

358 karma · joined May 7, 2020 (6y ago) · 121 submissions

I'm all about developer productivity. If you want to be more productive, subscribe to my newsletter https://codefaster.substack.com

@canardivore on twitter

Submissions

comment 6y ago · link · parent

Is there anything in my tutorial that I can help clarify for you?

comment 6y ago · link · parent

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.

comment 6y ago · link · parent

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))

comment 6y ago · link · parent

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 reader that it's the end of one filter and the start of a new one, the latter is more implicit.

comment 6y ago · link · parent

I would also be fascinated to hear how you're using it.

comment 6y ago · link · parent

Thanks for flagging that, they've been fixed and retested, thank you jbotz!

97.

Mastering Jq: Part 1(codefaster.substack.com ↗)

205 points · by code-faster · 6y ago · 72 comments

98.

Track Your TODOs(codefaster.substack.com ↗)

1 points · by code-faster · 6y ago · discuss

comment 6y ago · link · parent

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 like json-diff which diffs json files and formats the output as json.

100.

Printf Debugging(codefaster.substack.com ↗)

1 points · by code-faster · 6y ago · discuss

comment 6y ago · link · parent

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.

comment 6y ago · link · parent

Posting both on your own blog and others is called "blog syndication", it's a common practice that's googleable.

103.

XML Is Not Injective(codefaster.substack.com ↗)

3 points · by code-faster · 6y ago · 4 comments

comment 6y ago · link · parent

Yeah, but computer performance isn't a bottleneck in most applications, engineer performance is.

comment 6y ago · link · parent

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 determinable. I can use this cable to charge my laptop...but how long will it take? That's the issue

comment 6y ago · link · parent

yeah a 2d logo on the connector or a cable pattern is better, good call.

comment 6y ago · link · parent

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 high it can go. Pick a standard, pick a level, don't exceed the standard even if you can.

Color coding? Yup. Colors. A human must be able to visually determine what specs a cable matches and doesn't match. Before, different standards had different ports, so color didn't matter. But usb c wants to be the same port for multiple standards. Fine. Color code it. It can even be a small dot by the plug, as long as it doesn't wear off.

comment 6y ago · link · parent

Your standards make you valuable and you're wasting your potential at $current_company. Find a new job.

comment 6y ago · link · parent

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 needs to get done, it's about helping management get a picture for the state of work.

Developers and other line workers don't care about obsolete vs won't do. But management does. They want to know if they're being requested for work that will be rendered useless in a few weeks. They want to know if too much work isn't getting done because work is floating up to the CEO and it's not worth his time.

There's a terrible principal agent problem here where management, the principal, decides how to track work, and can put the heavy lifting of filling in values onto the developers. This happens when management's more worried about losing their job than improving their team's output.

comment 6y ago · link · parent

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're remote, your resume is what will land you an interview. Your skill important because that'll land you an offer. The number of hours you log will matter most and that will depend on how much you like what you're doing. You want to have the "oops I worked too much again" problem, not the "oops I forgot to work again" problem

Finding a job: Find a remote engineering job. You may find luck in crypto, check out https://cryptocurrencyjobs.co/engineering/

DM me on twitter, @code_faster if you have more questions.

comment 6y ago · link · parent

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 unnecessary features.

comment 6y ago · link · parent

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 increases certainty.

Joel's advice assumes you will overestimate your certainty.

113.

Make JSON your lingua franca(codefaster.substack.com ↗)

1 points · by code-faster · 6y ago · 2 comments

comment 6y ago · link · parent

Immeasurable model risk

When convex this is good When concave this is bad So if all else is equal, the convexity breaks the tie.

comment 6y ago · link · parent

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.

116.

Stop Messing with Time(codefaster.substack.com ↗)

1 points · by code-faster · 6y ago · discuss

comment 6y ago · link · parent

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 are much easier parse and therefore process. You can quickly whip up programs that verify the tests satisfy invariants, diff the tests and filter out expected test changes from unexpected test changes.

118.

Pick Straightforward Test Data(codefaster.substack.com ↗)

1 points · by code-faster · 6y ago · discuss

comment 6y ago · link · parent

I started a blog, https://codefaster.substack.com, to share a passion of mine: developer productivity. It's something I've done for myself for the past 9 years, reading countless books, trying enumerable tools, and even inventing a few originsl techniques. Now I want to help others who want to be more productive, especially now that corona has accelerated the need for automation.
12345