News for hackers. Stuff that matters.

cjvirtucio

Re:jq 1.7 released on Thursday September 07, 2023 @09:48AM (#37418870)
my favorite tool; makes writing a bash fun for me.
Re:Pure Bash Bible on Thursday August 10, 2023 @08:22AM (#37075276)
you could also just write as if you're writing go:

function main {

  if ! failing_cmd; then
    log "this fails!"
    return 1
  fi

  log "this won't log"
}

main

I only mention this because there are folks who don't like set -e.

Re:I Am Leaving on Wednesday July 12, 2023 @09:22AM (#36694139)
reddit and youtube were my last remaining social platforms. quit reddit because of the API changes. might be quitting youtube, as well, because of the ads. and then there'll be nothing left for me to spend time on except code and family.
most fun I've had with a programming language in years
Re:Ask HN: Programs that saved you 100 hours? (2022 edition) on Tuesday December 20, 2022 @03:40PM (#34072201)
good ole find, grep, sed, and jq.
Re:Vim After 15 Years on Saturday October 29, 2022 @03:00PM (#33386972)
the main thing that allows me to be productive with "only" vim is, funnily enough, things outside vim: bash knowledge. search, for instance, I can usually do in flexible ways with a pipeline of commands.
Re:Google is shutting down Stadia on Friday September 30, 2022 @07:22AM (#33033457)
I wouldn't mind this, honestly. a game can be solid even on an old engine. just look at how long the Monster Hunter series had been on their old engine before overhauling with World.
Re:Advanced Bash-Scripting Guide (2014) on Friday August 19, 2022 @02:34PM (#32524544)
it's so much easier to glue tools together with it. I'd end up writing more code if I had used python's subprocess package or ruby's IO package. as long as I don't need a complex data structure of some sort.
Re:You can read my blog posts using curl on Wednesday July 27, 2022 @10:13AM (#32250621)
huh. TIL, that's pretty cool. guess I know what I'm doing next weekend..
Re:You can read my blog posts using curl on Wednesday July 27, 2022 @09:08AM (#32249959)
would've liked something like this on hugo
Re:Lessons learned from the recent job hunt on Sunday May 08, 2022 @03:59PM (#31307602)
>Knowing that I had two offers, and that I had gone through a very long process with them and having received an offer, I knew that I was a candidate they'd like to hire. This is the perfect time to get that extra worth, as you hold a lot of the chips, especially with two offers.

This has always been really hard for me to do, particularly if I actually am happy with the offer. It could be imposter syndrome, where I often feel like I don't "deserve" it.

Re:.NET Myths Dispelled on Saturday March 12, 2022 @07:03PM (#30656409)
I've worked with .NET in the past few years and I've been pretty happy with it. The syntactic sugar is great, and it seems like we get interesting new features every release. My favorite from .NET 6.0 has to be the integration of dotnet-format as a subcommand. I regularly use vim so being able to format code without opening an IDE has been really helpful.
Re:Ask HN: Let's build Checkstyle for Bash? on Sunday February 20, 2022 @08:53AM (#30405672)
Ansible has a linter. We do use it on our playbooks (locally and in CI). There's also a framework for testing and linting ansible plugins (ansible-test IIRC), though that's been a little painful for us to setup.

That said, we do have a lot of helper scripts that we use in our day-to-day (local development). They're not "large bash scripts", but they're small enough that we don't really need a proper programming language. Some degree of code quality with style guides and shellcheck does help.

Re:When I do TDD and when I don’t on Thursday February 17, 2022 @04:08PM (#30378698)
I find tests more helpful when the implementation is stable. It's a little tedious to re-write test cases as unknowns come up.
Re:Bash patterns I use weekly on Tuesday November 23, 2021 @02:47PM (#29322409)
and on the off-chance that `stuff` must be a space-separated string for w/e reason:

  IFS=' ' read -ra routes <<<"${stuff}"
  for route in "${routes[@]}"; do
    curl localhost:8080/"$route"
  done
Re:Useful sed scripts and patterns on Friday November 12, 2021 @09:43AM (#29199698)
I'm annoyed at how sed has --regexp-extended, while grep has `--extended-regexp`. I'm sure there's a reason for it, but it always makes me stop and think which command has which flag.
Re:WSL2 can now mount Linux ext4 disks directly on Tuesday November 09, 2021 @08:00AM (#29161140)
Some companies only support OSX or Windows workstations, in which case WSL helps (for the latter scenario).
Re:Why don't tech companies pay their engineers to stay? on Tuesday August 03, 2021 @03:09PM (#28052895)
This approach reminds me of the DevOps practice of breaking down information silos: make everyone learn a little bit of everything so that no one becomes a risk.
It's gotten to a point where if I run into an issue, my first instinct is to go to the source code instead of the docs.
Re:Programming is hard on Wednesday April 07, 2021 @03:02PM (#26729437)
There's a tangible benefit to programming, e.g. I just automated this process and now it runs daily and I don't have to worry about it anymore for the 99% case.

I can't get that with a rubik's cube.

Re:CUPID – the back story on Monday March 22, 2021 @02:27PM (#26544731)
pylint irritates me a bit for this. I already created an abstraction, and I'm using the abstraction in a few places, but pylint doesn't like that and says it's duplicate code.
Re:Write libraries instead of services, where possible on Tuesday March 09, 2021 @12:04PM (#26400824)
unipdf for golang is another example.
I agree with this.. I've personally been more effective in an async communication type of approach. Communication over email, slack messages, ticket comments.. just leave a comment on my ticket, give me time to ponder on it, then I'll respond. If there's anything mission critical that really requires everyone to sit down in a room together, then we can schedule a meeting.

I accept that not everyone's like me, though.

Re:We are building a CLI first PaaS without a web frontend on Thursday November 05, 2020 @03:03PM (#25001439)
I typically write bash wrappers in situations like that. You could also write in a real programming language that shells out to the CLI tool if it gets too complicated.. even better if there's a library that does away with the need of shelling out.
Re:Ask HN: What did you do to improve your company? on Tuesday September 08, 2020 @03:03PM (#24411760)
Fully automated a process that I had zero domain knowledge on.
Re:The Case Against OOP Is Wildly Overstated on Friday July 31, 2020 @03:08PM (#24012601)
I have difficulty maintaining a stance in the OOP vs. FP debate. Like, all I see in my day-to-day is OOP, so I know what good, production-ready OOP looks like, but I've never an equivalent for FP. Would be nice to see a before/after article, i.e. an OOP app refactored into FP, talking about why the latter is better.
She could literally execute the piledriver with a flick of a finger!
What happens when one is working on something that is neither of the two things in your last sentence?
Re:Programming Inside a Container on Friday May 22, 2020 @05:35PM (#23277326)
Agreed.. there's ways to have a "pristine" environment on the host machine, anyway. Our team uses ansible.
Re:When will Google shut down Stadia? on Thursday November 21, 2019 @01:42PM (#21597732)
Inbox was good.

And then they killed it for no reason.

Older »