HNHacker News
TopNewBestAskShowJobs

adambatkin

642 karma · joined June 25, 2014

submissionscomments
adambatkin··on AWS Account Takeover via Log4Shell
Don't blame the language, blame the library. At least it's not part of the standard library - in C, if you accidentally pass a user-provided string to the first argument of printf() you could be in just as much trouble.
adambatkin··on Generics facilitators in Go
It depends. There is always an increased demand for memory (which can impact the whole hierarchy) but other than that it shouldn't be bad. And I think the point is that compared to interface{}, generics will almost always win. And realistically, compared to hand-rolled, you'd need to hand-roll (or codegen, whatever) multiple implementations which, as machine code, would end up exactly the same as the generic implementation.

And what are we optimizing for anyway? Reading a bunch of code that uses an off-the-shelf library's Stack or Tree or whatever is always going to be easier to read than having to also have to inspect the three hand-rolled Tree implementations, two of which are probably buggy, in addition to the actual client code trying to use the tree to do real work. Or a library that implemented it using interface{} which is a big middle finger to the whole type system, completely discarding the compiler's ability to detect otherwise trivial mistakes.

adambatkin··on Hidden Networks in TP-Link Routers
Mikrotik!
adambatkin··on Log4Shell update: second Log4j vulnerability published
Maybe your opinion is unpopular for a reason. C and C++ has always suffered from the ability to corrupt some memory (like overrun a buffer) and jump into and start executing some user-provided arbitrary data. Perl/Python/Ruby/PHP and friends all have eval() which is even easier to exploit. Rust and maybe Go are much in this respect (because in most cases you need to deliberately mark a piece of code as unsafe before you'd be in too much trouble) but even then, the developer could always make a logic error and (for example) take a parameter from the user and use it to generate a filename and overwrite something on the system. And with this bug, the issue isn't something like a missing bounds check or off-by-one error, but a deliberate feature that someone wrote to work this way (yes there were some interactions they probably didn't think about, but it's obvious to everyone that it's never okay to decide the format string in the log message itself, that should be part of your static configuration).
adambatkin··on Log4j RCE Found
Out of the box (at least on my text 1.8 JVM): corbaname, dns, iiop, iiopname, ldap, ldaps, rmi

For full details of how this works, use a vulnerable log4j version, log a simple (bad) lookup, and step through with a debugger for a while.

Sources:

  - https://github.com/JetBrains/jdk8u_jdk/blob/master/src/share/classes/com/sun/naming/internal/ResourceManager.java#L422
  - https://github.com/JetBrains/jdk8u_jdk/blob/master/src/share/classes/javax/naming/spi/NamingManager.java#L558
  - https://github.com/JetBrains/jdk8u_jdk/tree/master/src/share/classes/com/sun/jndi/url
By default the class will be named "com.sun.jndi.url.<scheme>.<scheme>URLContextFactory"

So for example, if your schema, the class will be "com.sun.jndi.url.ldap.ldapURLContextFactory".

But also note that many of these schemes can return referrals/redirects to other protocols.

adambatkin··on How I Use Notion
GitJournal is pretty great. The automagical git sync Just Works, so everything is right where I need it, when I need it.

I spend 90% of my time on my "daily" notes, so (selfishly) that's where I would focus. My challenges there are:

1. My date format is "YYYY/MM - MMMM/YYYY-MM-DD" in a folder called Daily, which means the files have names like "Daily/11 - November/2021-11-18.md" (and surprisingly, Obsidian accepts that date format and manages the intermediate directories just fine). That crazy date/filename format would need to be configurable and supported for (I think) the Journal feature to work well 2. I don't include a heading with the date at the top of my Daily files (actually, _any_ files), so finding the right note (when I see a bunch of cards that all look pretty similar) can be challenging - at least my directory structure means I can narrow down to the month very fast by looking at the folder names 3. Bonus points for a calendar view to make #1 and #2 easier?

I think if I had to pick the biggest challenge, it's #2 because I end up with a big soup of files that all look the same, where the important thing to discriminate between them is the filename.

I also love the commercial model - I love Open Source, but I don't mind paying for quality, so I get the best of both worlds here. And more importantly, I don't have to spend a huge amount of money just to trial the software for a couple months - I can pay the (small) monthly fee, and if I like it, either pay the "full" fee or just keep paying monthly.

adambatkin··on How I Use Notion
I recently started using Obsidian for exactly this reason. Although the software is non-Free, it's just a fancy Markdown editor (but more than that). Since all the data is Markdown - and most importantly, stored on the filesystem _as_ Markdown files - there is no proprietary database. I back everything with Git (and my personal Git server - unrelated to Obsidian - gives my nice Markdown previews and includes a web-based editor). Sometimes I find myself without a GUI and naturally the files all load nicely with vim (and works well with vimwiki). And on mobile I use GitJournal (Android) which is nowhere near as powerful as Obsidian, but for mostly reads and occasional writes, it's seamless Git sync really makes it easy to handle.

And if some day something happens to Obsidian, I'll just go back to Vimwiki. After all, my conversion process moving to Obsidian consisted of the single step of opening my existing Vimwiki directory structure with Obsidian...

adambatkin··on US Cybercom says mass exploitation of Atlassian Confluence vulnerability ongoing
Being able to self-host is a hard requirement for many organizations. Especially for tools like a wiki, which may contain proprietary/secret business information.

The last time we reviewed the Atlassian Cloud hosted products, they did not meet our security needs (requirements include isolated tenant from other customers, customer managed keys, etc) though they were much closer than a few years earlier. We also review the general security practices of the company (for example to make sure they implement a secure SDLC and follow other security best-practices).

adambatkin··on Another free CA as an alternative to Let's Encrypt
I do the challenge verification using DNS and Route 53, and the process has permission to update the challenge record and nothing else. So what you are describing is definitely possible.
adambatkin··on WhatsApp lead and other tech experts fire back at Apple’s Child Safety plan
Source? I am not aware of a law in the US that requires Apple to actively scan images, or to store them unencrypted (or keep copies of the keys).
adambatkin··on The Third User or Why Apple Keeps Doing Foolish Things (2013)
> What do most buyers not want? They don’t want to see all kinds of scary-looking controls surrounding a media player. They don’t want to see a whole bunch of buttons they don’t understand.

Funny. When I first switched from iPhone to Android, I downloaded a podcast player app one day. It has about 9000 knobs, levers and other controls to customize everything you could possibly imagine. Years later, I still have no idea what most of them do. But a few of them have been incredibly useful over the years. Advanced, complicated options that I had to Google or read Reddit threads to understand. Things that I could have survived without, are probably not used by very many people, but for those that do use those features, life is better with them.

Anyway, as soon as I had a cursory glance around the app, I immediately purchased the paid/pro version, not yet even knowing if I'd ever use the app again (at the time I didn't know when I'd even have time to listen to podcasts). These were my people.

adambatkin··on Amazon Web Services In Plain English (2019)
AWS offers a bunch of different queue-like services: SQS, Kinesis, MSK, Amazon MQ (supporting both ActiveMQ and RabbitMQ).

I don't think it's possible to build a queue-as-a-service that is any simpler than SQS, so there is literally no better name than SQS. (also, the suggested name "Amazon Queue" is pretty similar to the name "Amazon MQ" which does in fact exist)

It's a queue. It supports enqueue and dequeue. And that's pretty much it. It's a Simple Queue Service.

adambatkin··on Amazon Web Services In Plain English (2019)
IAM "Should have been called Users, Keys and Certs"

That's funny. Because we have hundreds of developers using AWS every day, using IAM all the time, and never using a single IAM User.

IAM is actually named extremely well. identity and Access Management. I can't think of a better name. And if your problem is that you just don't like acronyms, you probably picked the wrong industry.

adambatkin··on MongoDB Wire Protocol Specification License
If you reverse-engineered the protocol (either from scratch, or by looking at existing implementations) and happened to (independently) come up with an identical looking data schema, that would _not_ be protected by copyright.
adambatkin··on MongoDB Wire Protocol Specification License
Is the wire protocol copyrightable? If not, then this license only affects the _document_ itself, not downstream implementations that may _use_ the document.

And if there is a differently-licenses _implementation_ of the protocol, one would assume that it is possible to implement (or just use directly) that implementation without any reliance on this specific specification document.

In other words: IANAL but I don't think this will accomplish what they want (which is Amazon re-implementing a wire-compatible-with-MongoDB database)

As an example: I (probably) can't scan and redistribute an entire cookbook, but I can bake cookies from a recipe in the cookbook and sell them.

adambatkin··on A reporter’s fight to expose Epstein’s crimes, and earn a living
Those whispers must be pretty quiet. Do you have any sources for this?
adambatkin··on How to manually merge two Apple IDs to one (2020)
This article misses out on one of the most important things, something that CAN NOT be moved: Purchased apps.

Somehow, I have two different Apple accounts. Both are tied to the same e-mail address (which _should_ be impossible, and in fact, if I try to edit the profile of one, it complains that I can't do that since the e-mail address is already in use). This means that whenever I want to set up an iDevice, I need to log in to one account, download all the apps I want from there, then switch the App Store to the other account, and download the rest of the apps.

Of course, Apple support told me to pound sand. But at least they were friendly about it.

adambatkin··on SparkFun Hooks a Patent Troll
The citation is literally The US Constitution: "To promote the progress of science and useful arts, by securing for limited times to authors and inventors the exclusive right to their respective writings and discoveries."
adambatkin··on New GitHub Issues Beta
This X 1000.

Even as a developer, I don't always know which repo to file something against. And most "issues" span multiple repositories. Sure, I need to add feature X to repository A and feature Y to repository B (in order to implement some bigger project) but that's not how we plan or assign work.

More importantly, at our daily standup, we need a single view across all of our tasks/work, not the work within a single repository.

adambatkin··on The Elephant at WWDC
Yes, of course, when working on a piece of code (a low-level task), one should know where it sits within the bigger system. One needs to know all kinds of things about what lives both upstream and downstream, as well as some high-level architecture of the system as a whole. But the implication above (which I disagreed with) was that "good coding skills" (and thus a filter during hiring) implied "good documentation skills" does not follow from any of that.

Again: Code is always "low-level" (regardless of how much you do or don't know about the rest of the system) just like most API documentation. The complaint of the original article wasn't about API documentation, but about higher-level conceptual documentation being lacking. And just like not all "coders" may be able to design a large and complex system (though they may certainly be able to understand it) they also may be unable to document those high-level conceptual aspects of the system.

adambatkin··on The Elephant at WWDC
No.

Modern programming languages and frameworks are explicitly designed so that you don't need to see how your code fits into the whole. That's the whole point of building abstractions, because it's too hard to keep all of the details in your head at one time. Writing code is generally concerned with the low-level details, which are hidden from other parts of the system (and that's a good thing). When you ask someone a coding question, that's what you are testing. To the point of the article, yeah maybe there is some correlation between someone who is good at writing code and good at writing API documentation.

The complaint in the article is that the high-level conceptual documentation is lacking. The systems design stuff. The architecture. And while there are certainly people who are good at writing low-level code as well as understanding high-level architecture, that's not always true, as they are very different skillets (and I don't mean this as a slight against anyone, it's probable that most people who are good at one could become good at the other, but in practice, many people's jobs lead them to spend more time on one instead of the other, so that's where they build up skills and experience).

Anyway, the higher-level documentation is a very different style of writing. It needs to read like a book (as opposed to API documentation which is more like a dictionary or encyclopedia). You need to be able to pull information together from lots of places, and it must be presented in a methodical way, where (for example) you can't assume that the reader has knowledge of something before you have presented it.

adambatkin··on It's time for us in the tech world to speak out about cryptocurrency
Blockchain as a technology is definitely innovative. The problem is that, in practice, the way that it solves certain problems come with tradeoffs. This isn't a technical problem per-se, just that it doesn't (IMHO) solve any real problems better (given the tradeoffs) than other, more "traditional" solutions. That's not to say that you can't make money with blockchain tech (just like you can make money playing blackjack).
adambatkin··on It's time for us in the tech world to speak out about cryptocurrency
The "crypto" world, as in Cryptography has far more practitioners and far more hardware and software than cryptocurrency. And most of of the world's communications (among other things) rely on "crypto" as in Cryptography. The "old" usage (as you put it) remains orders of magnitude more instrumental to all of our lives than blockchain technologies (which is a far more accurate name). And will remain so, for the rest of all of our lives.
adambatkin··on Programming language subreddits and their choice of words
This is incredible insightful, and I wish more people thought this way. Computers are just a tool. Sometimes we get caught up in the shiny new toys and pursuit of some theoretical perfection, instead of just getting work done.

I'd bet, for every HN commenter extolling the virtues of some new language, framework or database, there are 10X that many developers quietly hacking away writing boring and ugly VB (and Perl, Java and whatever other languages people consider uncool) code on an ancient MySQL or SQL Server or MS Access database, solving real problems, and getting the job done. Which, in the end, is all that really matters.

(I consider myself a professional, I try to pick the right tools for the job, design maintainable systems, and write clean code, but at the end of the day, I'm paid to deliver value for the business, not build a monument of coding perfection. Life is full of tradeoffs)

adambatkin··on FTC and several states sue Frontier Communications regarding internet speeds
Frontier also serves a bunch of reasonably large cities (for example territory they purchased from AT&T later in life). Where I live, I can get Frontier's "up to 24Mbit/s" service (probably closer to 10 if I'm lucky) or the competitor (cable company) which offers both traditional cable AND a new FiOS service with speeds up to 1 Gigabit. I haven't upgraded yet, and am still on 200 down/35 up but pay a fraction of what Frontier would charge (and I usually get closer to 215 down and 36 up). It's no wonder Frontier declared bankruptcy.
adambatkin··on Google employees call for company to support Palestinians and allow anti-Zionism
Zionism is the idea that Jews should have a homeland in what is (now) Israel. It is not exclusionary - there are non-Jewish (including Muslim) citizens in Israel, and they have full rights (far more than they would have in most of the neighboring Arab countries, and yes there is sometimes racism - just like everywhere else in the world, though that is no excuse - but the that has nothing to do with Zionism).

You can choose not to support Zionism. But if you actively believe "Jews should not have a homeland" that is anti-semetic.

adambatkin··on Google employees call for company to support Palestinians and allow anti-Zionism
The Palestinian people definitely deserve sympathy, and I think everyone (even Israelis) agree. The difference of opinion is that some people blame Israel for their problems, while others blame Hamas.

Let's be clear though: Anti-zionism is a form of antisemitism. People can rationalize all they want about how/why it isn't, but they would be wrong. You can argue all you want about the policies of the current Israeli government, but anti-zionism is still a form of racism.

adambatkin··on Tauri: Rust-based Electron alternative releases beta
Why Node and not Dino?
adambatkin··on Java's records, Lombok's data, and Kotlin's data classes
Lombok and Kotlin are both much easier to integrate into existing Java applications and libraries than Scala.
adambatkin··on How Big Tech got so big: hundreds of acquisitions
Mine too. But it has nothing to do with the hardware or software (I'd argue that for many things the Apple ecosystem makes things harder due to its inflexibility) and everything to do with the fact that whenever they have a problem they can walk to an Apple Store (or call Apple Care) and they are able to help without having to work around my time constraints (job, family, etc...) I suppose that's a type of integration too (the fact that Apple has retail stores and a Genius Bar that for "normal" people works well to solve "normal" problems) but it has nothing to do with pure technological innovation.
← PreviousPage 2 of 4Next →