HNHacker News
TopNewBestAskShowJobs

nulagrithom

1,867 karma · joined March 12, 2013

submissionscomments
nulagrithom··on Startup Engineers and Our Mistakes with MongoDB
The MongoDB document linked says "Referencing should be used to represent complex many-to-many relationships" ... "References are usually implemented by saving the _id field of one document in the related document as a reference. A second query is then executed by the application to return the referenced data."

So... It's like a join, but with two queries instead of one, and you push the join data to the webserver, which brings us back to the start of this comment thread...

nulagrithom··on Startup Engineers and Our Mistakes with MongoDB
If we dump everything we might JOIN on to a single document then in many cases we're going to end up with a ridiculously nested document, and/or duplicate data everywhere. Let's try mapping out the project I'm working on right now.

We've got moves, and each move has multiple stops:

  move: {
    shipper: string,
    consignee: string,
    stops: [{
      address: string,
      appt: datetime,
    }] 
  }
So far this looks great. I like this. Yay MongoDB!

But I need to add a driver to each stop... Where do I put the driver? If I put him under the stop I'm going to duplicate his data all over the place. Do I put the move under the driver instead?

  driver: {
    name: string,
    id: string,
    moves: [{
      shipper: string,
      consignee: string,
      stops: [{
        address: string,
        appt: datetime,
    }]
  }
Ok, not bad. We've got an array of objects under an array of objects but I'm still perfectly comfortable.

Now I need to get a terminal-based look at all the drivers, so I know what every driver is doing in a particular city, also drivers can actually have multiple trucks too:

  terminal: {
    city: string,
    drivers: [{
      name: string,
      id: string,
      truck: [{
        plate: string,
        moves: [{
          shipper: string,
          consignee: string,
          stops: [{
            address: string,
            appt: datetime,
          }]
        }]
      }]
    }]
  }
That's getting a touch nested but... Drivers actually work for vendors, and vendors might work across multiple terminals. Do we duplicate the vendor across terminals, or the terminal across vendors? Also even the driver/truck relationship is many-to-many... Do we duplicate the truck info? What happens when we need to update a truck? Do we attempt to update across all drivers? Do we duplicate that data too?

  terminal: {
    city: string,
    vendor: [{ // many-to-many! duplicate vendor data?
      id: string,
      drivers: [{
        name: string,
        id: string,
        truck: [{ // many-to-many! duplicate truck data?
          plate: string,
          moves: [{
            shipper: string,
            consignee: string,
            stops: [{
              address: string,
              appt: datetime,
            }]
          }]
        }]
      }]
    }]
  }
Ok, this schema is starting to look like shit and it's only going to get worse. The shipper and consignee should actually be unique objects as well, and we might want to update the contact info on them. Do we duplicate that data and update across all moves?

Also we want to cross-reference the shipper, consignee, billing, and ordering entities for market analysis (the consignee isn't always the customer, and the customer doesn't even always get the bill!) Do we duplicate that information across moves? Do we duplicate moves across entities? More many-to-many relationships...

Maybe I'm just not creative enough to use MongoDB, but I'm really starting to feel like this is a square peg in a round hole.

nulagrithom··on Startup Engineers and Our Mistakes with MongoDB
Simplified, a JOIN on an SQL server will take advantage of its indexes to grab the data from the disk that matches the specified criteria. SQL databases are built for this sort of thing, and they're really freaking good at it.

Sending that same JOIN to the web server means, at the least, shipping everything from both tables matching the criteria and matching up those two potentially huge blobs of data with each other on the web server. Doing this in an even partially efficient manner will split your query logic between DB queries and other code. Also, it's not unlikely that you'll be doing this JOIN operation in a language that maybe isn't great at optimizing that sort of CPU intense behavior on its own, so you're probably going to need to drill in and optimize on your own (vs letting SQL do its magic). Plus, we're going to need to store all this data in memory while we match it. So now our web servers, while more easily scaled than a DB, are actually pretty damn big boxes with decent memory and CPU, and that's expensive to scale.

nulagrithom··on Used GPUs flood the market as Ethereum's price drops below $150
Wenatchee Valley. KWH are somewhere just above 2 cents. Lots of electric plants down the Columbia river, and Wenatchee has great 1 GBPS connectivity throughout.
nulagrithom··on Used GPUs flood the market as Ethereum's price drops below $150
Not the parent commenter but yes, Chelan and Douglas counties have fantastically inexpensive kwh due to their hydroelectric plants.

The dams are owned by a public entity and the cheap power and plants are meant to be a boon to the local economy. Last I heard (directly from a city council member last year) there is a moratorium on high load customers due in part to all the mining operations that sprung up. Realistically, for the Public Utility District it's been much more profitable to sell the power to other states than it is to allow more mining operations to eat the cheap power.

There were high hopes for the data centers that sprouted up in neighboring Grant county, but they didn't bring anywhere near the number of local jobs that were expected (leaving a bunch of empty houses in Quincy). That in combination with the closure of the Alcoa aluminum plant (which purchased the _entirety_ of one of the smaller dam's output) and you shouldn't expect the moratorium to be lifted any time soon.

nulagrithom··on Why Can’t Americans Get a Raise?
Wrong article?
nulagrithom··on Jefferies gives IBM Watson a Wall Street reality check
Not sure what part of IBM you're in, but I can speak as someone in an i Series shop.

The problem isn't the message. Everyone already drank the kool-aid. A lot of the problem is just the shoddy product, but really it boils down to the culture.

Put out comprehensive documentation _on the indexable Internet_ and not in PDFs, because for christsake if I have to open another Red Book PDF I think I might kill myself.

Make things that are open source -- and I don't mean Open Source™. Let me learn the platform. Let me hack away at an i Series or whatever on my own time.

Everything is so buried behind licensing and paywalls and PDFs and just general bullshit that I can _never_ invest in _anything_ IBM on a personal level. The vendor lock-in is so heavy that I resist even wasting time learning IBM products because in the back of my mind I'm always thinking "I'll never be able to take this with me to a new job."

The garden walls are too high.

nulagrithom··on Maersk IT systems infected with ransomware
I'm in the intermodal industry. CEO likes to say that transportation is about 10 years behind technology, and intermodal is 5 years behind that.

We have the security posture of a wet sock.

nulagrithom··on A Cyberattack 'the World Isn’t Ready For'
I feel silly saying this, but I sometimes imagine a scenario in which the attackers are not motivated by money but instead are aiming to simply cause as much destruction as possible, like some kind of "cyberterrorism".

Imagine if the creators of WannaCry had decided to brick everything they could, instead of _just_ holding data for ransom. What then?

Ben-Oni (from the article) says he sees it as "life-and-death". I agree. We're simply not prepared for a well-coordinated attack. I think it will take a true catastrophe before anyone really understands just how vulnerable the Internet is.

nulagrithom··on Where we're going, we don't need headphones
Solo dev
nulagrithom··on If companies interviewed tech recruiters the way they interview programmers
Are you assuming that people who haven't maintained a vanilla JS app don't actually know JS?
nulagrithom··on Where we're going, we don't need headphones
> I think people who assume that sitting with headphones on all the time means they should never be 'disturbed' are being a bit uncharitable.

I stop feeling charitable when I start missing deadlines and can't get any work done because of constant interruptions.

Is there a more clear way that I can signal I need fewer interruptions than a closed door and headphones? Just a couple hours each day without being interrupted would be great.

nulagrithom··on Where we're going, we don't need headphones
I'm not sure the problem is with the physical decibel level of office noise at all. My workplace is silent as a tomb, we all have our own offices with closing doors, and I still bring headphones to work.

Sure, even something little as phone chatter can be distracting, but the main distractions come from people just passing by and saying 'hi', or worse, actually needing something from me and interrupting my work. Headphones and a closed door tend to signal that I'm busy, but even then someone will knock on the window and see if they can come in.

People are intentionally distracting, and I think it's something that's way harder to fix than just a stop light indicating noise level. It has to be "fixed" on multiple levels. Having an office culture of "just stop by their desk" is a huge problem, but I can't imagine being unavailable because there's so many distractions that really are urgent and need my synchronous interaction right now. That's a tough thing to fix.

nulagrithom··on $80k/month App Store Scam
I'd imagine there's some companies that even Apple can't bully.
nulagrithom··on Verelox Wiped by Ex-Admin
If we go to war with China I don't think you or anyone else will care much about your company.

I know you meant it as an example, but this sort of extreme attitude towards security is just another footgun.

nulagrithom··on Cheap Recurring Payments with Stripe and AWS Lambda
Also I think we just took it down...
nulagrithom··on Cheap Recurring Payments with Stripe and AWS Lambda
I worked with an ecommerce shop for a while that wanted to go with the cheaper payment processor through their bank.

We spent a lot of developer time getting that 0.05% rate difference to work. Yes, that's a lot over a year, but we were constantly discovering undocumented error codes and "interesting" corner cases. The processor went down often enough that we actually ended up configuring a backup payment gateway on top of it (manual failover -- and yes it was well used). A year later and we still didn't have all the bugs ironed out.

Additionally the "PCI Scan" through the bank couldn't handle a DNS name, only a fixed IP address. This was one among many other issues with the PCI scan that ended up wasting weeks of developer time. In the end they literally gave up on scanning the site and just gave it a pass.

Believe it or not (I didn't at the time) there's actually more to card processing and banking than just a rate. You definitely get what you pay for.

nulagrithom··on How to Improve a Legacy Codebase
So because Microsoft made SOAP and also made TypeScript then TypeScript must be bad? That's nonsense.

Also, I'm not a frontend guy, and the comment I was replying to was talking about node.js, but having to put a setTimeout or something in your tests just seems wrong.

nulagrithom··on Node v8.0.0 Released
Thanks for your work! CLI has always been my primary method of debugging node, and I'd hate to see it go away.

Is this pretty much identical to the old debugger?

nulagrithom··on Why do so few people major in computer science?
I got dropped in to an AS/400 environment a few years ago. All my knowledge instantly vanished. It was harrowing.

There were so many idiosyncrasies my coworkers knew that I had to learn (anyone know how to push the F22 key?) The terminal didn't function in any way I was familiar with at all (no ls, cd, mv, nothing). The "filesystem" was basically for interoperability while the actual system ran with a concept of "libraries" instead of folder hierarchy.

I ended up having to take basic lessons on the system.

It really gave me an appreciation for "stupid computer shit we all know". It sucks to be in a position of not knowing that stuff. Suddenly the most basic functions becomes monumental tasks.

nulagrithom··on How to Improve a Legacy Codebase
Try TypeScript.

Though I wouldn't think that test coverage needs "perfect" to catch a bad variable name, but maybe that's why there's so much obsessive tooling when it comes to coverage in the JavaScript world.

nulagrithom··on Ask HN: What is the most common security mistake you see?
Not even trying.

Seriously, you wouldn't believe the number of companies/people who don't even try. I'm talking "db.run(request.body)" levels of not-trying, "the shared admin password is 'turtle'" levels of not-trying; "the medical records are protected because they're on a hidden share" levels of not-trying.

These are all things that I've seen.

Second to that is thinking that you're trying because every once in a while you have a vague sense of paranoia.

"Let's use MongoDB so we're safe from SQL injection." "We need to proxy the API because that's what other people do." "The WiFi password is secure because it's 26 characters long -- even though we're still using WEP."

Also things I've seen.

I know I'm not any better either. Given the opportunity, I would always hire a professional to audit my stuff.

nulagrithom··on Ask HN: Favorite HN comment(s)
My opinion towards JavaScript is much like Cato's towards Carthage: it must be rooted out, eliminated and destroyed entirely. I don't know if I'd go quite so far as to say that the fundamental challenge of mass computing is the final destruction of JavaScript — but I want to say it, even though it's false.

Beautiful.

I actually really enjoy node.js and the ecosystem + community surrounding JavaScript. There's seriously a lot of passion and work going in to it.

JavaScript itself though? Horrible. I hate it.

nulagrithom··on Ask HN: Favorite HN comment(s)
Raise your rates: https://news.ycombinator.com/item?id=4247615
nulagrithom··on One Step Closer to a Closed Internet
Where I'm at in the US, we have a Public Utility District that's "owned" by the city (top position is an elected position too). They've run fiber everywhere and leased it to local ISPs.

I can get gigabit for under $90/mo. Lowest tier is 100x10 for under $50.

One of our local ISPs even built a real nice wireless mesh network with a fiber "backbone". You can get low-latency 35x2 service way up in the hills of nowhere.

It's amazing what happens when Internet is treated like a utility.

nulagrithom··on A startup’s Firebase bill suddenly increased from $25 to $1750 per month
I don't understand.

> The Firebase Realtime Database charges for SSL overhead on all requests ... We’ve always had a policy of charging this way.

So it's always been charged.

> Unfortunately, we introduced a bug late last year that began undercharging for SSL

Except it hasn't always been charged?

> We recently started actually enforcing overages on legacy plans and our current fixed-price ($25/mo Flame) plan.

In fact, if you're on a Spark or Flame plan, it's never been charged?

I feel like this response is straight from Office Space or something. "So we just went ahead and fixed the glitch."

nulagrithom··on Voten.co, a Real-Time Reddit Alternative Launches Public Beta
I think they backtracked on the CSS removal.

Still, something like CSS removal, spezgiving, or Pao happening again could easily trigger a migration. Voat didn't take off simply because it couldn't handle the load when those events occurred.

nulagrithom··on Web Developer Security Checklist
If someone is yanking and reading disks at AWS then the game was over a long time ago. Physical access always wins.

IMO, if you're on AWS (or similar) then at rest encryption is a wholly unnecessary expense, unless you need to tick some kind of regulatory checkbox. I can see it for smaller on premise racks to prevent a "smash and grab" problem, but in a secure datacenter? Nah...

nulagrithom··on Noun Project – Icons for Everything
For example: https://github.com/pugjs/pug/issues/2189

Jade had to rename. They picked 'Pug' and needed a logo. christopherdowson asks if anyone can propose a logo and ends up creating the final logo.

Pretty neat thread IMO.

nulagrithom··on Total.js Messenger – A small alternative to Slack
Took me a bit to figure out that Total.js is a framework and the Slack clone (Messenger) is built on top of it.

Total.js itself appears to be 15k lines in a single file with no dependencies, built and maintained by one guy (for the most part). Insanity.

← PreviousPage 6 of 11Next →