HNHacker News
TopNewBestAskShowJobs

tankerdude

162 karma · joined September 6, 2013

submissionscomments
tankerdude··on The Idempotency-Key HTTP header field
That’s dead on what I’ve been doing on my projects for some time. I also track it with a correlation id once it reaches my network so that I can put all logging and context into ELK for my aggregated logging. I can then see everything that that request did in my entire system.
tankerdude··on SQLAlchemy 1.4
Others already pointed out that you can use a core method. What I see is that I actually rewrote a query that had 7 joins (yes, it was not great), and rewrote it in SQLAlchemy that made for a the query to have a lot fewer total lines of code to write.

I validated it by checking out what it would generate via its internal SQL compiler.

So for me, it was more like, am I competent enough to write less code and fewer mistakes, due to functions, autocomplete, etc. versus writing the full SQL.

It's a time saving for me, and the queries are expected. I also echo the SQL query to make sure that that's the exact query I want.

Lastly, I then groused at the engineer who decided that the query pulled in so much crap from so many tables in 1 query.

tankerdude··on University of California Will Stop Using SAT, ACT
Yes, but wealthy or not, the UCs limit the number of kits from high achieving schools, usually to around 50 for UCLA and UCB, as examples.

They then accept a certain number for every lower achieving school, due to the 10% requirement (is it still 10% these days?). People then game the system, with the wealthy, moving to a poorly performing school, and the child will be ranked very high in their school, so it is easy to get into the highest rated UCs.

I will also disagree that the SAT is a leveling field. The reason is that in the high achieving schools, the child is sent to private tutors and classes every single year of their lives starting in elementary school. The parents will spend $1k+/month on activities as well as academic classes. That type of knowledge seriously adds up.

For the disadvantaged, they _could_ but the steps are a lot steeper, and most don't make those steps.

tankerdude··on An introduction to RabbitMQ
If it's super simple like that and the throughput isn't massive, use something else you don't need to support, like AWS's SQS.

If you're bad at hosting and need the throughput, there's cloudamqp.

So many options for pub/sub systems so use what works for you.

tankerdude··on An introduction to RabbitMQ
You would think, until you get to a split brain issue. The master and failover lose connectivity, and they each then think they're the master.

There's ways to repair it (and it has happened to me one total time in 4 years), but it does happen. I personally try to make my message processing idempotent for the worker to help alleviate these situations.

tankerdude··on How much does air pollution cost the U.S.?
Data on that point? What's the comparison to new ICE production?
tankerdude··on SAT to Add ‘Adversity Score’ That Rates Students’ Hardships
From the article: "The score will be calculated using 15 factors, including the relative quality of the student’s high school and the crime rate and poverty level of the student’s neighborhood."

So no, it doesn't account for you to secretly discriminate against you. What it does do, for the penalization part, is that the schools that are in affluent neighborhoods have access to much better resources than ones from Compton or Watts.

To me, a kid from Compton who scores 1500 on the SAT far outweighs someone from Palo Alto High who also scores 1500 because of all the resources the latter received to be able to reach it.

Moving is orthogonal to the problem, except that the district could be brutally hard for some kids.

Also, imagine the other folks in your neighborhood who got literally everything. Driving to school in a Maserati and spending for 4 different tutors over the course of 12 years.

Who is more deserving? You, who scored 1500, or him, who scored 1500? I sure hope you don't say, "it should equal!"

tankerdude··on Chevy Volt discontinued: Chevrolet's last Volt rolls off the assembly line
All that about Tesla is true. The one hope I have is the updating software. Their usb stick audio is miserable. Favorites break.

Better phone integration would be great.

Either way, the electric car experience is so much better than anything else. Maintenance on my Leaf is near nothing.

tankerdude··on Python Developer Survey 2018 Results
It might be scary to you, but who runs Python at scale? youtube ran it for quite a long time. reddit yelp

Those sites seem mainstays to me, with good load. Perhaps performance is a problem for you for the server load and costs that you want, but it does allow you to iterate quickly to get your product out the door.

Last thing though: Checked errors. I think that's largely solved with type hinting (along the lines of TypeScript) where you get some guarantees.

Stacks of choice though for me is really Python and Go. I would use Go for when I truly need that raw speed with a lot fewer servers in Go in terms of horizontally scaling.

tankerdude··on California Considers Placing a Mileage Tax on Drivers (2017)
As we have seen, the heavier vehicles do disproportionately more damage than a lighter vehicle. If you road repair, tax by a formula of weight and mileage if you must.

Having a driver if a hummer pay the same taxes based upon miles driven versus a a VW bug really doesn’t make sense when we know the stress put in the road by the hummer is substantially more.

Lastly, for LA, having a disincentive to have an emissions free car while driving just gets the air quality even worse.

tankerdude··on Top 3% of U.S. Taxpayers Paid Majority of Income Taxes in 2016
Progressive for federal income taxes, yes. But overall progressive, the answer is simply no.

Many places switched from part of income tax to fees. Skyrocketed increase for fees to national parks this past year. Went up 300% for a weekly pass. You apply that over and over again in many parts of your life, and it adds up.

It just simply costs more of the percentage of your income to live and because of it, it takes a bigger chunk of your income and thus isn’t progressive.

Lastly, Social Security is a kicker for the one thing that is flat out regressive. Capital gains pays zilch for it, and it stops at 127K or so of income. That tax is burdened by the middle class.

That’s chump change for the wealthy, but anyone hit by it is burdened less and less the more money they make.

And don’t tell me it’s a “fund”. That’s not how the GOP acts with it.

tankerdude··on Top 3% of U.S. Taxpayers Paid Majority of Income Taxes in 2016
No chance. There are lies and there are statistics. It misses the point about local taxes and fees.

If you flip it around, and ask, how much of your total income is used to pay taxes and fees for federal, state, and local taxes, the ones at the lower end will be paying a much higher percentage of their income.

There is only so much you actually have to pay for when you become rich where the folks on the lower end must pay for certain things that take a larger part of their income.

No chance it is “fair” and we know who is writing the tax laws.

tankerdude··on Molten: A modern Python (3.6+) web framework
Molten does what I've seen in RoR land do. You decorate and document your schema. It then can spit out an OpenAPI spec, use its schema and tooling around OpenAPI.

So it becomes a choice. A decision of writing mostly OpenAPI, or writing Python via an API that is defined by someone (or a small set of people).

I'd personally rather learn OpenAPI specs as you're going to live in that world anyways, as it gives you so much tooling.

It's not hard, and you could take that yaml file and generate code for other languages in case Python's performance specifically for that API (especially it if is a microservice), runs too slowly in the real world and need a faster runtime, etc.

tankerdude··on Molten: A modern Python (3.6+) web framework
How does this compare with Connexion?

Uses Swagger/OpenAPI that then uses convention (or fully defined) packages, and methods for REST. Runs on top of Flask, and does a lot of all of the validation all from the yaml file. Plumbing taken care for you, etc. so you can focus on business logic?

tankerdude··on Woman Rides Bicycle to 183.9 MPH, a New World Record
Instead of “Skate or Die!”, this is totally “Draft or Die!”

Timing craziness and so many things that could go wrong....

tankerdude··on SETI spots dozens of new mysterious signals emanating from distant galaxy
im Kind of stumped at the whole advanced life form contacting us thing.

1. We didnt even emit any real radio waves until just a century or so ago. How did they detect it to know to emit something to us? 2. How much power would that entity have to emit from that distance to be detectable by us? 3. And for civilizations more than 50 light years away, how did they know to even push a signal in our direction if they didn’t sense a single thing except maybe a certain type of atmosphere?

tankerdude··on Profile: David A. Huffman (1991)
I had classes with him for the last few years that he taught at UCSC. He never had a text book for his classes that I took (graph theory etc). He also almost never used his computer in his office it seemed and enjoyed the theory quite a bit more.

Fun classes but alas, he passed away a few years later from cancer.

tankerdude··on Rails, still?
Lately, I’ve used Flask with Connexion, JWT, SQLAlchemy, and Alembic did my microservice APIs.

Relatively few lines of code that comes with validation, API playground, and defined routes plugged in via the swagger doc.

The main I ssue is having a nice admin page, tbh. Flask doesn’t have one like Django but eh. Good enough I suppose.

tankerdude··on California Moves to Require 100% Clean Electricity by 2045
The pace is already going to beat that legislation at it’s current rate.

This codifies that they don’t drag behind.

tankerdude··on Apple and Google Face Growing Revolt Over App Store ‘Tax’
Dim Sum: Joy Luck Palace (Sunnyvale). LA, the one that’s very good is Five Star Seafood (SGV off of Del Mar). 888 in Valley a little east of that place. Don’t go to Elite, Ocean Star, or mission, IMO. They are kind of on par with Jou Luck Palace. Koi Palace(Daly City) and Flower Lounge(Millbrae), Mayflower(Milpitas) I would stay away from.

Seafood: Newport Seafood(SGV). The restaurants listed above are decent for the Bay Area with Mayflower a notch or two below.

Best Taiwanese street food: Sin Ba La (Arcadia). Southland Flavor Cafe(Cupertino)

Lastly, in LA, the 626 Night Market is lots of crazy street food.

(Bistro Na is great too.)

tankerdude··on Apple and Google Face Growing Revolt Over App Store ‘Tax’
Untrue. Chinese restaurants in the SGV are tough.

3 stars in LA crushes 5 stars in other cities in the US.

And yes, I’ve lived 10 years in the Bay Area and the Chinese food pales in comparison.

tankerdude··on Idempotence: What is it and why should I care?
Yup. This is actually an interview question that I go through to see if they know mechanisms to prevent the double charge, fulfillment, etc. problem.
tankerdude··on California Is Deteriorating into a Feudal Society of Inherited Land Wealth
You don’t own a home or have depreciated a business property have you? You can depreciate the value of a building over time but not the property itself.

Land value is still land value and will never be “depreciated”.

What happens is that folks like Disney in Anaheim as well as it seems, Apple owned the land for a long time. So Disney’s real estate tax bill is near nothing for Disneyland.

That’s the pain of prop 13. Should have been modified for sure!

tankerdude··on Battery breakthrough: Double performance lithium battery that doesn’t catch fire
Agreed that that was definitely the big initial breakthrough.

We need this next one sooner or later for mass adoption.

As Musk says, show me him a battery with the breakthrough and the manufacturing process for it. If it's good, he'd switch it out to that battery. No one has succeeded yet at that challenge.

tankerdude··on Battery breakthrough: Double performance lithium battery that doesn’t catch fire
So many battery breakthroughs have been announced. Not one of the "breakthroughs" for cars have been released to the public. Most are "5 years away" or more.

Ionic with the polymer batteries looks promising, but again, as others have stated, it's the manufacturing process that is rough.

Works great in the lab, but scaling what was done in the lab to the public is really, really hard.

tankerdude··on Do Fathers Who Exercise Have Smarter Babies?
So that would imply that people who actually must exercise for their job (construction workers) would have smarter children, on average? And how would that be measured if the child gets stuck in a poorly performing school and no real academic challenges?
tankerdude··on Young Chinese are sick of working long hours
The article references the 996 hours and the title of the article is about UNPAID overtime. If it truly is unpaid, I would walk away in a heartbeat as well. Unless it’s office work, getting tired in a warehouse would mean higher chances of injury and death.

Would you in the US be informed that you are getting paid $20/hr but it stops at 8 hours? There is a reason that the US has laws about the minimum that people can get paid on a salary.

tankerdude··on It’s COBOL all the way down
COBOL maybe alive but from doing a little bit of searching, the pay scale looks like about half of what a senior engineer in a more modern language makes.
tankerdude··on Jeff Bezos' advice: Don't aim for work-life balance; it's a circle
Bezos is a really smart guy but here, I beg to differ. I interviewed for a management role over at Amazon. I asked them what they thought of work life balance and how many hours are we talking about a week. 60 or so was the minimum, and that doesn't include lunches. 12+ hour days didn't seem like something you can sustain no matter how much energy you have.

Sooner or later, you will get physically and mentally exhausted at work, even though you have lots of fun doing so before you get wiped out.

I also informed them that if your engineers are working 70+ hours a week basically every week, then you don't have an engineering problem but a management problem. It's no longer a work-life balance, but purely a work-work balance, and that it was up to management to ensure that they don't burn their engineers out.

I didn't get to the next round (thankfully). I didn't "fit their culture". So I thanked them and moved on. Better for them, better for me.

I personally want people who are effective, and can put in a solid day of work. I still pull wisdom from, "Debugging the Development Process" back from 1994. I think it still holds true today for many aspects of software engineering. Or am I really an outdated curmudgeon?

tankerdude··on Gruber on the Macbook Pro Keyboard
It's miserable, the new keyboard. 30+ years of having the escape key in the upper left hand corner for me, and for them to switch it over to an _offset_ touch escape key has driven me a little insane.
Page 1 of 4Next →