Better HN
topnewbestaskshowjobs
Log inSign up

nullbytesmatter

105 karma · joined Apr 23, 2021 (5y ago) · 62 submissions

Submissions

31.

Ask HN: Best Productivity Techniques for Developers?

1 points · by nullbytesmatter · 4y ago · discuss

comment 4y ago · link · parent

Affordable, meaning reasonable pricing. Ie, not like Palo Alto's 3 million for 1200 square feet.

comment 4y ago · link · parent

All of the above? If I could tack on more: affordable land (1~10 acres), good hospital(s) within a reasonable drive.

34.

Ask HN: Best Place to Live in the USA?

6 points · by nullbytesmatter · 4y ago · 10 comments

comment 4y ago · link · parent

I was wrong, it took around 5 days, but it finished!

comment 4y ago · link · parent

What cul option? Cursor line highlighting? I also recommend putting synmaxcol to something low, like 80-128.

comment 4y ago · link · parent

I managed to "dedupe and merge" by importing the CSV into sqlite and add an index on a column, and then scanning the index by distinct values and doing an index lookup for each key and merging the rows.

Not ideal at all, but it seems fast enough. I calculated it will complete in ~50 hours.

comment 4y ago · link · parent

I have a Librem 15v4 by Purism. It's no longer sold, but it's a nice laptop. It's the only Purism laptop with a 4K screen. For some reason, you can only find FHD screens these days.

System76 has some decent laptop options for Linux, but all are FHD.If I had to purchase a new laptop today, I'd look at System 76's Lemur Pro or Purism's Librem 14.

comment 4y ago · link · parent

I have tried something similar, writing each entry to a trie on the filesystem and store each duplicate row on the filesystem. The problem was this created a heck of a mess and was taking too long, but it seems like it's feasible.

comment 4y ago · link · parent

Your script parses the entire CSV and then dedupes in memory. This would require ~3TB+ RAM.

comment 4y ago · link · parent

Interesting idea to do two passes and build a merge list ahead of time. I am not sure if there's enough memory to build up such a list but it's worth a try.

Edit: I tried, and OOM'd by the OS. Apparently 64GB of RAM isn't enough to key off the unique column.

42.

Ask HN: How to Deal with CSVs?

3 points · by nullbytesmatter · 4y ago · 16 comments

comment 4y ago · link · parent

This reads like a manic episode.

comment 4y ago · link · parent

There were many factors. Rails itself isn't too bad to upgrade, but the problem boiled down to various Rails engines (active admin, etc). There came a point where I sat down and had to decide if it was worth de-tangling the mess and potentially breaking a lot of things to upgrade Rails and the various dependencies (only to do this again in 5 years), or possibly build things in a way that would work regardless of the dependencies.

Sure-- the rewrite was more effort up front but the hope was the long term compounding benefits would be worth it. I don't generally advocate for rewrites but in this case I went for it (and actually got it done).

comment 4y ago · link · parent

Great question-- and may be worth a detailed/thought out blog post some day!

To future proof the service I wanted to use tech that was based on the fundamentals. This boiled down to no special tooling, no special build process, etc. Furthermore I cut out all dependencies I could. I got my third party dependencies down to two (postgres + nginx).

Practically speaking this meant: no node, no yarn, no ruby, no webpack, no sidekiq, no redis, etc.

The entire service is now Nginx, Postgres and a single binary that has html/css/js/assets embedded inside of it. The entire product is a single Go binary that connects to postgres-- that's it.

I could probably do without Nginx, but it has been nice for a variety of reasons and has never given me a headache.

My tech/decisions may not be for everyone (that is why I didn't share them initially) but it works incredibly well for me and most products I build.

comment 4y ago · link · parent

I have been running a product since 2015 and I feel the author's pain. The original tech I used was Ruby on Rails, and it was great (back in Rails 5). However, with Rails 7 and all the other changes since 2015, the debt was pretty overwhelming. Updating dependencies became difficult. Deploying a new server felt impossible. It felt like it was held together with toothpicks and glue. Afraid to update X because Y would break. I couldn't update Y or Z would break.

Unlike the author, my product was making actual money ($XXX,000). I ended up completely rewriting the product from scratch (took ~3 months). I just swapped the old Rails service out for the new service on April 1st.

I stuck to "simple and boring" tech for the new stack. No more Rails, etc.

comment 4y ago · link · parent

Having separate data and code never causes problems either? Just because you bundle them together, doesn't mean the data and code are together during development. They get bundled together in the build process.

It's not as bad as say, writing HTML in JavaScript (JSX).

comment 4y ago · link · parent

There are plenty of good reasons to roll your own solution. A blog is about as risk-free of a situation as you will get when it comes to rolling your own.

It's not like the author is rolling their own encryption library.

comment 4y ago · link · parent

I have been using the same distro/tiling wm setup since 2015. A bare bones debian netinstall with dwm and xorg.

comment 4y ago · link · parent

Yet, in many countries nursing homes are not even a thing and somehow people survive.

comment 4y ago · link · parent

Post was emotionally charged but left me thinking, “If you cared so much about her why did you stick her in a nursing home?”

comment 4y ago · link · parent

Honest question, why use a company product over free tools like zap or even burp for this?

comment 4y ago · link · parent

My biggest gripe with Rails has been the lack of real concurrency without a large number of cores and threads (where each worker consumes an entire rails app worth of memory). It doesn't take long before you're chugging on 12+ gb of memory.

comment 4y ago · link · parent

I always store the secret key for TOTP before I use the QR code. I have a command line app I wrote that can generate OTP codes using the same secret key, so as a back up I can always generate codes with my desktop or phone.

comment 5y ago · link · parent

A lot of people say the same things about Rails. It makes you productive, it's incredibly easy to do things, things just work, etc.

I have used Rails for most of my career and for a number of side ventures. I have to say I have had a love-hate relationship with it.

I love everything people love about Rails (mentioned above). What I hate is how the speed and productivity comes back to bite you later.

The code eventually turns into a ball of mud and becomes near impossible to update. You have N-dependencies that depend on Y-dependencies of their own. Different Rails versions or module versions, and you can't update one without breaking something else.

You eventually live with it, and nothing gets updated but then you want security updates, and sometimes something terrible happens (like the mimemagic catastrophe) that forces you to ham fist updates together and live with some rails engines not working completely. But that's ok, because productivity right?

comment 5y ago · link · parent

Has been five years and never happened. I don't optimize for problems I don't have.

I do daily backups and have the ability to deploy a "new" server if need be. It's a little bit of manual work but would be trivial.

comment 5y ago · link · parent

I run a solo SaaS product with 15,000+ users. I use the "arcane/wizardry" techniques still.

I simply run "make deploy" and a new production build is made and rsync'd to production. Then the script executes a "deploy.sh" on the production server which reloads the system process to pick up the new binary.

Poof.

123