HNHacker News
TopNewBestAskShowJobs

_benj

2,459 karma · joined March 3, 2017

Working on getting "side projects" to "stuff other people use" :-) reach me at benj (dot) calderon (at) gmail (dot) com
submissionscomments
_benj··on Ask HN: What code editors or IDEs are easily scriptable?
adding a few fun ones that I've used in the past:

TextAdept. The API is fully open to Lua and a bunch of stuff can be scripted in it. The author is super responsive on github and has a nice small welcoming community.

Lite XL is mostly written in Lua, less documentation than TextAdept but is not terribly hard to jump into the code and figure out how the editor works and modify it.

Micro uses Lua for plugins. It's a terminal only editor, which is a plus for some people, but still the mouse support is quite nice.

_benj··on Ask HN: What code editors or IDEs are easily scriptable?
To add a few less popular options, I really liked working with TextAdept. Almost the whole API is accessible via Lua and you can script the heck out of that editor.

The challenge with that is that you don't get a lot of items out of the box. The community is awesome though and the author of the project is very responsive in github.

There's also Lite XL, which is also a very hackable editor. Also hackable in Lua. The documentation for it is a bit lacking but one can jump into the code and start tweaking things in it.

There's also micro. This one also uses Lua for writing plugins and such. It's a terminal editor if that's something you are interested in.

_benj··on Show HN: I made a tool to easily transform and manipulate your JSON data
This is such a cool tool! I wonder if the developer audience might me a bit of a misfit when we have stuff like jq or duckdb.

But here's a use case I had a few years ago. I was working with this system that needed occasional calibration from time to time from non-developers (read Product Manager or Technicians). The calibrations were stored in JSON, but JSON is quite finicky regarding syntax, specially when edited manually.

I implemented a graphical structured JSON editor that would take a JSON file, present you input fields to edit the JSON (input for text, checkboxes for bools, etc) and would allow the user to edit the JSON graphically and produce a valid JSON at the other end.

It was the tool I wish I had to tell the technicians to use when they needed to update things on the JSON file without manually editing the file.

I never published the project but it was really fun to work on it because I needed to handle the JSON in order, use types, and such things that JSON doesn't support so I ended up using Pest.rs, directly editing the AST, compiling to WASM... first time I using PEGs and such.

Best of luck with your project!

_benj··on Software engineers are not (and should not be) technicians
I have a story about engineer vs technician. In my very first technology job (title was web assistant, so, very much technician) we updated our online education platform and suddenly all our course were breaking.

After some investigation we found that one line in an xml inside the course zip file needed changing. So, my manager planned how to do it. We'll divide the 40k courses into batches, different individuals would tackles certain batches and it all would be done in about 4-6 weeks...

Well, probably my ADHD brain or just being lazy but that sounded like an awful lot of repetitive work that I didn't want to do (change file extension to .zip, decompress, go to file X, find line with XYZ and replace for ABC, save, compress, change file extension back to proprietary format), so after talking with my boss and asking permission I got a week to try to automate that.

Back then I knew almost nothing about software development but I was aware of bash and python... so I cobbled together a janky script that would likely make me cry if I saw it now, tested it on 1 course, then on 10, then on 100... and then shared with my boss. It all worked perfectly! We still batches of about 1k courses at a time to confirm that everything was working ok, and in the end the job took about 2 days and 1 person (as opposed to 4-6 weeks and 5 people).

I was very proud of that accomplishment and very likely marked my perception of the value of software as a tool to decrease human effort (nobody got laid off or leaved, is not like we didn't have A TON of work apart from that migration).

Anyways, just wanted to share :-)

_benj··on One Million Checkboxes
The UX team recommends to make it infinite scrolling… improves user “engagement”.
_benj··on Microsoft removes documentation for switching to a local account in Windows 11
I’ve been leaning towards using windows server for the few use cases that I need windows. The performance of it running on libvirt/qemu is indistinguishable, for me, to baremetal.

License is a bit of a challenge but with the 180 trail days and how little I actually use it I can afford to do a fresh installation every few months and be ok.

It’s kind of sad given than windows itself, at least the core OS used in windows server is rock solid… but when you go to the user offerings of windows 10/11 is such a stark contrast and crappy/unstable experience!

_benj··on Using the C preprocessor as an HTML templating engine
Thanks for sharing! Looks just like what I need :-)
_benj··on Using the C preprocessor as an HTML templating engine
I was considering doing something like this just the other day. It had a gnuplot script and it seemed to me that it would be so much more versatile if I could use #ifdefine and #include in it.

I ended up using a Perl preprocessor, but it seems like cpp would work ok-ish for certain use cases that don’t require, say, strict tabs like Python among a few other things mentioned on the cpp manual.

_benj··on Perl 5.40
I’ve started using Perl a couple of months ago and I’m quite impressed, specially with all the “bad” stuff I’ve heard about it.

It is incredibly flexible and productive and is very intentional in getting out of the way (what is it, Multiple Ways To Do Something?)

_benj··on PSA: If you're a fan of ATmega, try AVR Dx
I don’t remember having used a debugger with these, so I couldn’t tell you how was that experience
_benj··on PSA: If you're a fan of ATmega, try AVR Dx
I have worked with DD and have some DA laying around. The UPDI is a very nice and simple programming interface. All that it takes is a USB-UART and a diode or a resistor (I used a diode) to connect between RX/TX.

I didn’t used ATmega a lot, but comparing the experience to MSP430 and EFM8 the AVR chip has a bunch of niceties, superb documentation and life improvements like, in order to clear some registers all one need to do is write 1 instead of the whole =& ~(REG | 0x8) (or something like that, it’s been a while since I write embedded C)

The other thing that I loved is that one can download headers for the chip directly from the manufacturer!

Way too many chip manufacturers keep locking headers/libraries behind their proprietary IDEs, but Microchip, even though they have an IDE let’s you download the headers so one can use whatever tooling one is comfortable with! Props to Microchip for that!!

_benj··on Hacking millions of modems and investigating who hacked my modem
Wow! I just what a high a security researcher would feel while performing this research and keep finding open doors!

I wonder if it’s a mix of exhilaration and being terrified!

_benj··on Why do electronic components have such odd values? (2021)
There’s also part of, good designs don’t depend on high precision components. I think TAoE emphasized that. For high precision one can use trim potentiometers or maybe even digital potentiometer with an ADC at the other side to measure and get as close as possible, but otherwise depending on resistors for high precision is kinda rough (I’m think like an RC circuit that need a very specific resistance to meet some specific timing requirements)
_benj··on Are You an Anarchist? The Answer May Surprise You by David Graeber (2000)
> Anarchists are simply people who believe human beings are capable of behaving in a reasonable fashion without having to be forced to.

I find this definition interesting because it seems to me there’s a very prevalent portrayal in media pointing towards the opposite, that is that humans left alone (read, without some powerful/wealthy authority) will unravel into the most depraved state imaginable.

Reading the book factuality was fascinating because it showed me a view of humans that you don’t see in mass media since ordinary is boring and thus we only get either extremes of good or bad (read, saving the Amazon rainforest to a mother killing her child)

Anarchy by this definition is hard to believe (although I aim to) because we are bombarder with the exceptions to the rule

_benj··on Ask HN: What nonfiction books do you keep rereading?
This
_benj··on Ask HN: What nonfiction books do you keep rereading?
For me is

the psychology of money

getting things done, first edition

How to Win Friends and Influence People (Unfortunate title for one of the best books on plain common sense when it comes to interacting with people)

_benj··on Everyone Hates Workday
> The answer, to use a term that any client of Workday could surely use, is POSIWID. This is a saying in systems thinking: The purpose of a system is what it does (POSIWID), not what it fails to do. And the reality is that what Workday — and its many despised competitors — does for organizations is far more important than the anguish it causes everyone else.

That’s the part that baffles me. There’s less crappy HR software out there, I’ve been in companies that use better software, but still workday seems like the default choice?

The only explanation that comes to mind is that the people that buy workday don’t use it.

There’s a similar issue with LMS and educational software. I’ve talked with a few teachers and professors and it’s usually common that they hate __ LMS (I’ve talked with some that love another) but teachers, except in rare cases, are not the ones that make software purchases decisions for their schools or districts.

So if that’s the case all the workday needs to do to keep selling tons is to make pretty reports and tell executives how much money they can save by using their software instead of some more “hip” solution out there.

_benj··on I realized I am a bad programmer
I mostly did it on the side. A job on C might be quite interesting but seems to be limited nowadays to system level stuff, which is kinda rate to find.
_benj··on I realized I am a bad programmer
Echoing the sentiment of others here, a “good programmer” is not one that is able to implement some weird algorithm or complex data structure from memory.

If that where the metric I prefer working with “bad programmers”, say, that that actually get stuff done vs endless pedantic discussion about performance, optimization, and yes, nonsensical algorithms that are already implemented and tested in most languages standard libraries!

With that said, I hear you. It sounds like you might be feeling burned out?

Something that brought a lot of joy back to my programming career was learning C, low level and embedded programming.

There are a lot naysayers that will point how C is an insecure language and whatnot, but what C gives you, or makes you do, is understand how a computer actually works. Where is stuff placed in memory, what is your OS API (syscalls) or what are registers and how a CPU runs something (embedded programming).

YMMV of course, but getting the those insights has been invaluable for me and very fun! One feels back in control building stuff, as opposed to doing the work of a plumber just plugging stuff together (nothing bad with that, is mostly that kind of work that pays the bills after all!)

Anyways, just my two cents. Hope you can figure something out!

_benj··on Open-source alternative to Heroku, Vercel, and Netlify
I’ve been actually looking for some of these myself.

The two that I’ve used are cloudflare pages and bunny storage.

Cloudflare integrates with git and even runs builds for multiple static website frameworks (hugo, 11ty, etc)

Bunny storage is a bit clunkier when it comes to setting a ci/cd since it has nothing to support it. One can upload via ftp, web browser or API. And after uploading usually purging the cdn cache is needed to apply the changes.

I still prefer bunny because cloudflare give pages for “free”, which I don’t trust.

_benj··on How I stopped worrying and loved Makefiles
Great tip! Thanks for sharing :-)
_benj··on Thoughts on low latency trading if exchanges went full cloud
Thanks for the correction!
_benj··on Thoughts on low latency trading if exchanges went full cloud
This is an interesting read but I think it leaves outside what kind of trading is the one that would benefit from ULL.

ULL and currently HFT seems to be very useful for market making (buying the ask and selling the bid and profiting from the bid-ask spread making parts of a cent per transaction, done a few million times a day), but there are other uses for HFT. One of them would be to execute very big orders over time to instead of drastically rising the price of the security they can get a better cost basis by performing a set of trades, letting the market absorb the impact and continuing with the order.

The thought of having the market in a cloud provider like AWS scares me! Although I’m sure that AWS might have pitched the idea already. If the markets could be controlled by a private company that could schedule “maintenance” at convenient times for them, that sounds like a recipe for market manipulation bay trillion dollar company. Sounds like something the SEC wouldn’t stand for.

_benj··on Anatomy of a credit card rewards program
What a fascinating article. Probably an unsophisticated model but the way I approach my credit card rewards program is as a “forced savings” deal. I’m aware that they are subsidized, I’m also aware that I’ll pay the same thing if I were to pay with cash (at least in all the places I buy).

Would we be better off by having capped swipe fees? Idk. Would merchants actually lower their prices instead of keeping the extra revenue that everybody is now used to pay? Idk either. I don’t trust in the goodness of the heart of merchants or credit cards issuers.

But, would I have an unexpected 3 or even 4 figures “unexpected” rewards at the end of the year that I can only use for vacations? I don’t think so. I could possibly set up something with my bank, but I don’t need to think or plan rewards… they just happen.

_benj··on The biggest financial frauds ever – from Sam Bankman-Fried to Bernie Madoff
These stories sadden me because I can’t help but wonder, what else could you possibly “need” after your net-worth is above seven or eight? Figures?

Watching the Bernie Madoff documentary on Netflix I couldn’t get away from the question “why”? Same thing with the movie The Wolf of Wall Street. Why would someone “need” another 50 million dollars? How is it worth risking life in jail?

_benj··on Ask HN: What underrated open source project deserves more recognition?
ImHex

“A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.”

I actually used it not too long ago to inspect why a mp4 file wasn’t valid. The pattern language that they have is quite nice and having sections of the hex highlighted and being able to see what structures they represent and what data was on those structures was very useful!

https://github.com/WerWolv/ImHex

_benj··on Ask HN: Is Vim Dead?
I find this type of question a little funny. What do you mean by “dead” and who’s “everyone”?

Vim will likely be alive for decades to come for sysadmins editing files in /etc over ssh.

It might be “dead” for the new languages with a small community and nobody interested in adding support for vim…

So, it might be dead for some people and not for others.

At the end of the day I usually pick an editor that the language I’m gonna be writing has good support for.

Sublime for C, vscode for JS/TS, and jetbrains for golang

_benj··on United States White House Report on Memory Safe Programming [pdf]
This reminds me of a video I watched years ago with uncle Bob talking on a Clean Code talk mentioning that clean code was more than just a method to write code but also a strategy, a guideline if you will for when policymakers wake-up to the fact that the world is run with software and start making policy. It’d most certainly be better if those guidelines come from the industry itself as opposed to being imposed with little notion of how the industry works
_benj··on Forum reactions to Satoshi's Bitcoin paper
True. I have no idea, not even a clue where to start looking for such thing. It seems to me that the best one can do is just diversify, acquire a bunch of stuff that might grow and hold them for 20 years.
_benj··on Forum reactions to Satoshi's Bitcoin paper
Hindsight is rough. I wanted to buy some when I was in college living of student loans, they were at $600… I should have use my student loans to buy bitcoin instead of the hobbies I had in college…
← PreviousPage 4 of 20Next →