Better HN
topnewbestaskshowjobs
Log inSign up

makeitdouble

14,525 karma · joined Jun 2, 2021 (5y ago) · 5,901 submissions

Submissions

comment 5y ago · link · parent

Another Spurious Correlations [0]. The message will always bear repeating.

[0] https://tylervigen.com/spurious-correlations

comment 5y ago · link · parent

If you’re not careful and just be lazy with your hand crafted queries you’ll miss updating old queries when you alter your schema. You won’t convert your types the same way in each places you query the data, or you’ll forget checking your data’s consistency where it’s falling in the cracks between your SQL rules and the application’s requirements.

The “not careful and just be lazy” way won’t get you in a good place whatever approach you take.

comment 5y ago · link · parent

I guess that there’s not many people going to write a long essay on how they use ORMs moderately, knowing the limitations, and it’s perfectly fine. It wouldn’t gather a whole crowd either.

What feels wrong to me in this post is the lack of nuance on how they used their ORM. For instance the whole part on how the ORM generated queries they wish were done in a different manner: why didn’t they bother writing either lower level code or just raw SQL to get their data as they wished ?

It looks to me they could have kept their ORM for the 80% cases it works great, and hand tune the 20% that could be problematic. Just like any other optimization problem.

There would be still the performance part where some overhead would still be there, but it’s usually not an issue if the ORM option was on the table in the first place.

comment 5y ago · link · parent

Went to most of the article, and it seemed to boil down to this kind of reflection:

> But as time progresses, it’s only natural that a well-trained object-oriented developer will seek to leverage inheritance in the object system, and seek ways to do the same in the relational model.

Basically, things are not perfect, and people try to blindly apply layers upon layers, thus getting deeper and deeper into a quagmire.

But the proposed solution of applying no automated layer doesn’t compute. If he can restrain himself from using any ORM at all, why can’t he restrain himself from adding inheritance in ORM models or other “let’s OOP this to death” blind approach ?

This feels like the “I sometimes get drunk so I’ll build a whole support structure to stop me from drinking”, and at no point someone steps in to say “just be moderate and it will be fine”

comment 5y ago · link · parent

I'd tend to think that at this point people happy with Stack Overflow will go directly there. Going through generic search would be more to get either the official documentation link (Google can be faster than searching the language site ...), or trying to see what option there are on the subject we're looking for.

In particular, random errors can be easier to search when including blog posts and other docs that just SO.

Also not every search needs to be quick or optimized, finding alternatives along the way is nice sometimes.

comment 5y ago · link · parent

Anecdotally, last year a bit before Black Friday we wanted a new iPad (unrelated to the event, it just happened that way). Ordering directly from Apple had a 2 weeks delivery date, getting it from Amazon during Black Friday landed it 2 days after in front of our door.

And it was cheaper (same price, but bigger storage)

comment 5y ago · link · parent

To me there is two specific aspect of Black Friday that make it special for online shopping:

- retailers are showcasing a limited number of goods that they expect to sell fast.

This means short delivery times, no weird third party shipping from obscure places. They are prepared, and even buying at the same price as usual, the experience tends to be better.

- the piling up effect makes it worse for delivery, worker conditions are probably worse, even if they get paid some amount more than usual.

This makes it a very mixed bag, and I wish we had a better grip on the second point, to be able to fully appreciate the first one.

comment 5y ago · link · parent

When working on PHP only I didn’t care at all for the quirks or missing features. When going back and forth with other languages, PHP getting better becomes a huge quality of life improvement, the mental load we need to keep gets much lower.

PHP has always been a powerful language where the burden of making it work properly 250% relies on the dev. Stuff like enums should significantly reduce that ratio, it’s a big deal I think.

On the debugging part, I found something like ruby’s pry to be the easiest and fastest option. I wish PHP had something similar.

comment 5y ago · link · parent

You are putting too much meaning on the “digital” (yes, I know, it’s a name but).

The point is not the digitalness but the decentralized part. One of the main participant in this system is railroads, and they already introduced a money equivalent offline system (Suica/Pasmo) that is wildly used in lieu of cash. As worded in the article they want to take it a step further and convert their “points” to actual legal tender.

comment 5y ago · link · parent

Debit cards ask your bank for your balance and request them to debit you. This system is decentralized (backed by banks but offline use is assumed)

comment 5y ago · link · parent

Being able to convert back go standard money is a big deal. Currently all the digital offline payment means are a one way trip: you can pay for goods with them, but not exchange with someone or return it to your account. This initiative would solve that issue.

comment 5y ago · link · parent

When buying stuff online, either the credit card network temporarily foots the bill until the charge actually hits your bank, or your bank processes the transaction directly and money moves away by a bank to bank call. It needs to ne synchronous and connected.

With this new system I’d assume you transfer ownership of your money but it doesn’t need to have both banks connect directly, and there might be a chance to have it work offline as well.

comment 5y ago · link · parent

With prior knowledge of how quirky it is, I'd sacrifice way more time finding an expert from the start.

I don't think we did anything fundamentally wrong, short of underestimating the problem space. It's also not as if I was left in my corner for weeks, I got pretty good advices (like go finding more help and returning to basics). Getting info before the internet, before makers got into habits of published maintenance manuals etc. life was just way harder.

comment 5y ago · link · parent

When phones still had IR blasters, I got stuck for 3 weeks straight on a IR library that needed to imitate the sequences coming from a TV remote. Code was “done” in 2 days, the rest was spent in front of a TV to have my sequences get recognized.

Literally went to the library to read books on IR and make sure I understood what the doc was saying. Asked around to find people who worked on these kind of sequencing. Went to a small repair shop and bribed the tech to give me hints on how remotes work.

It was fun in retrospect, maddening and incredibly taxing at the time.

comment 5y ago · link · parent

If you feel like their question is trying to drag you into their field, you might want to also return a question instead. If none of you answers it stays as it is, if they were asking in good faith you get a better framing that isn't just a trap.

comment 5y ago · link · parent

I think parent would still go through those warm-ups if there was a legitimate chance for the conversation to go further.

Speaking for myself, if I was sitting at a social gathering I'd totally bear through any length of ice breaking to get to the meat of the conversation. If it was on a queue at the grocery store I'd bail out at the first 5 seconds. It's a matter of expectations.

comment 5y ago · link · parent

I think it will work way better when companies will plain stop calling customers at all.

As it stands now I receive ‘legitimate’ calls from a credit card company to open new options on my account. Or from my phone company to switch my plan. And the interesting part is that as it is ultimately to improve the caller’s monthly numbers, they won’t offer the same conditions online or through mail, I tried. And calling back the same person is a royal PITA. So in some cases, it costs me to not deal with transactions on the phone, inbound, from a person I need to trust to be what they say they are.

comment 5y ago · link · parent

Not telco, so I hope there will be better answers.

Phone numbers are basically identical to IP numbers in their use, and they are declared by the emitting party. Just as you can spoof IPs in the packet headers, you can spoof the telephone number at the tranport level.

We could upgrade to more secure connections, but the whole point of using the telephone network is because of the legacy. I can't imagine a telco putting significant money into improving the network when no customer will pay more for that (right now arguably, spammers are their first class customers ).

comment 5y ago · link · parent

By "public" buildings I meant "open to the public". Worst offenders of this are supermarkets and big retailers IMO.

comment 5y ago · link · parent

My issue with your approach is your first time programer still needs to:

- install/update PHP or go with the outdated version that shipped with their system.

- have a hosting service that will accept random PHP files

- know what their hosting's PHP version/configuration is to match it locally. For instance their hosting will keep the most secure config possible, thus no out of the box fetching of URLs.

- endlessly fight to find syntax errors as they are too new to have a linter. Depending on the PHP version they settled on they won't have error logs in one place but two.

- fight the endless stream of out of date tips and tricks left by 2 decades of PHP programers of various pedigree.

All of these have different variations for different languages, they all have their barriers and dead bodies in the closet. My take is that PHP isn't specially beginner friendly at this point, at least not as friendly as it was when it began.

Making a public website from scratch will be complex anyway, so they might as well go with a saner setup that uses a templating language and not write code right into the HTML. It won't be much harder and they'll have a fighting chance to find up to date tutorial to host their project easily (hosting a rails project on Heroku for instance could be miles easier in that respect)

comment 5y ago · link · parent

> If you're going to publish information that people might rely upon, especially in an emergency, you're taking on the responsibility of maintaining the accuracy of that information

That doesn't seem to work that way in most situations.

For instance there is a mandatory floor plan in all public buildings in case of emergency, and now with covid some do flow control by physically blocking entries/exits. These maps aren't updated to cross out blocked paths, and nobody seems to getting sued to outer space.

Gov sites are regularily broken, out of date, ridden with errors. I once needed to go to an clinic and used the GPS coordinates to go there, only to realize midway they were the town center coordinates and not the accurate building's coordinate. They still operate, I requested an update and it's not fixed.

comment 5y ago · link · parent

I see a number artisans managing their business on pen and paper, and handwrite receipts.

It works for them, but I wont tell random people starting a business now to go with pen and paper, 99% of the time that would be a bad advice when there are much much better alternatives now.

comment 5y ago · link · parent

Sure, but would you have that in production for the company you work for?

One can also use old school CGI to serve their site, it’s super lightweight and you just upload the file at the right place, for almost any language. But that has been deprecated for the last 2 decades now.

comment 5y ago · link · parent

You mention it in passing, how much ruby on rails experience have you ?

comment 5y ago · link · parent

That ship has sailed a long time ago (or you're just playing around and most languages will have a REPL nowadays)

Modern PHP wears a business suit and wants to buddy the "big boys" (Java/C#) of the world. You'll have deployment pipelines, strong push towards classic OOP, strict type checking etc.

I personally think ruby for instance is leaner in its dev process in most real world projects.

comment 5y ago · link · parent

I smell a "Robot or not" episode coming in.

I would assume Japanese people would call bonsai any plant in a recipient that has enough art to be enjoyable to watch. For instance I think moss is accepted, as long as it's artful and well groomed.

comment 5y ago · link · parent

A lot repair shops have been using screen and replacement part sourced randomly for common repairs.

You’ll see one in every shopping mall, and while franchised ones won’t be much affected, smaller shop should benefit from from wider access to parts (no need to get accepted as a repair shop for instance)

comment 5y ago · link · parent

This article felt pretty consistent to me, but I wonder if you aren't looking at it in term of a call to action, some practical advice, or trying to reach a simple conclusion.

I feel these kind of articles are harder to sell (we step outside of the fact based approach, right into beliefs and opinions). There is also the issue of most of these call to action and opinions getting buried pretty fast by virtue of ours current media system, as more often than not the conclusion is pretty brutal and disturbing to a majority of people.

comment 5y ago · link · parent

“Doing their homework” means learning enough about a subject to be able to explain in details what they are seeing/feeling and understanding what the doctor has to say about it.

It’s the difference between “my poo is weird” and “here’s my temperature during the last three days and each feces according to the Bristol scale”. A doctor just telling you to shove your observations in indecent places isn’t sparing anyone’s time. They might be missing the mark or unreliable, but that’s not what the parent was talking about.

On patients that think they know what they need and won’t budge an inch, you’ll have them anyway. Recognizing and properly dealing with these cases is part of being a doctor. You won’t see many 6 yo kid naturally sold on getting intramuscular injections.

comment 5y ago · link · parent

An issue in the duplicated approach is keeping track of the different blocks once they diverge enough.

In the best case scenario they all slighty change over time without forcing complexity on each other. But it becomes a problem as changes that should be breaking only break part of the code, and the rest can go unfixed as nobody remembers all the linked bits.

It would be critical for instance if the duplicated bits were involved in invoicing procedures, and one in five remained unchanged while the other got updated.

1
181182183
197