HNHacker News
TopNewBestAskShowJobs

obpe

240 karma · joined August 29, 2018

submissionscomments
obpe··on Htmx Is the Future
>Node does not absolve from this. Any important verification still needs to be done on the server side, since any JS on the client side cannot be trusted to not be manipulated. JS on the client side was of course possible before NodeJS. NodeJS did not add anything there regarding where one must verify inputs. Relying on things being checked in the frontend/client-side is just writing insecure websites/apps.

Yeah, that was my point. With Node you can write JS to validate on both the client and server. In the article, they suggest you can just do a server request whenever you need to validate user input.

>Basically most of any progress in bandwidth or ressources is eaten by more bloat.

In my experience, the bloat comes from Analytics and binary data (image/video) not functional code for the SPA. Unfortunately, the business keeps claiming it's "important" to them to have analytics... I don't see it but they pay my salary.

obpe··on Htmx Is the Future
It's kinda funny to me that many of the "pros" of this approach are the exact reasons so many abandoned MPAs in the first place.

For instance, a major selling point of Node was running JS on both the client and server so you can write the code once. It's a pretty shitty client experience if you have to do a network request for each and every validation of user input.

Also, there was a push to move the shitty code from the server to the client to free up server resources and prevent your servers from ruining the experience for everyone.

We moved away for MPAs because they were bloated, slow and difficult to work with. SPAs have definitely become what they sought to replace.

But that isn't because of the technology, it's because all the devs writing shitty MPAs are now writing shitty SPAs. If this becomes popular, they will start writing shitty MPAs again. Nothing about this technology will stop that.

obpe··on Ask HN: Is AI causing companies/individuals to rethink their security?
If your security posture is mostly filled with current best practices then AI hacks aren't anymore scary than regular hacks.

Phishing is by far the number one way we have been hacked in the past. Education, MFA and soon passwordless logins are the best way to prevent phishing. If your CEO calls you and asks for your network credentials, DON'T DO IT!!! It doesn't matter that it sounds a lot like them.

For personal use devices, we are are already required to install some "endpoint protection" app if we want to access company resources. I don't do it simply so I don't have to and I get to say I don't have access to email outside of work hours.

AI hacks are not any more sophisticated than regular hacks; it's more like the level of technical sophistication has been lowered to make use of them. This is constantly happening anyway, as hacks are integrated into commodity pen testing frameworks.

obpe··on Roll your own JavaScript runtime, pt. 3
JS has improved a lot over the years but I am not sure I would want it as the default scripting language for applications. JS is really only useful because it's the language you access the browser's API with. If you are creating a different kind of application and therefore don't need the DOM or other browser things then why JS at all? Having worked with Lua for some game mods, it seems like a better choice for an integrated language. Maybe a Rust inspired language would make a better fit for a modern DSL... insert XKCD comic about standards proliferation.
obpe··on To Type or Not to Type?
I recently started working on a project that added TS after the project was very mature. The biggest problem is the project was never intended to have types so they feel very shoehorned in and, imo, cause far more problems than they are solving. I think in this specific case the project simply should not have been updated with types.

I have worked with JS a lot and have only used TS in this one instance. I would be interested in working on a project that included TS from the beginning to see a better representation of TS.

Also, fwiw, we have solved many of the same problems with linting and automated tests. But this requires education and maintenance; it would be interesting to compare this effort with a TS project.

obpe··on Ask HN: What to do about wage theft?
I think they are counting on the fact that any recourse you do have would be far more expensive to acquire than the amount owed. Economically, it's probably not in your interest to follow through. Basically, consult a lawyer if you actually want to.
obpe··on Ask HN: What programming tasks you saw GPT4 fail badly at
I haven't used GPT4 but my experience with Copilot is that it's just inconsistent. I think a big problem for me is I work in a legacy web environment with a lot of technologies that were never popular. So generating generic code that saves a google lookup is pretty good but anything more complex seems to be a waste of time.

The biggest successes I have seen are where AI does all, or most, of the work. I am not sure an AI could do my job but I do think, in the near future, AI could replace my entire team/department.

However, technology moves fast but business moves slow. I work for a pretty big enterprise that deploys dozens, if not hundreds, of web sites, apps and services. It's not like when AI becomes feasible, all of a sudden all of these things will be AI driven and there will be no need for any further technical expertise. Further, most businesses are not going to invest into a fanciful new technology with a proven cost/benefit model.

obpe··on Ask HN: Trying to be strategic about my career as a junior, any advice?
While I do see huge potential in AI, I personally do not see it as the existential threat you propose in this post. This is something I have thought a lot about.

Do you have a CS degree? If so, then it shouldn't matter too much that your only experience is in web dev, you'll just be looking for more junior roles in other fields which is probably true given your time out off and minimal experience anyway.

Firstly, technology moves fast but business's move slow. I work in a very strict environment due to the regulation of the industry and the volume of PII we deal with. So my work has prohibited the use of AI tools due to unknown security risks. Until they can quantify and mitigate the risk, they probably won't let us use these tools. Furthermore, the software I work on was running on Windows Server 2003 until a couple years ago. Of course, there is a difference between possible efficiency gains from implementing AI and a server upgrade which would provide no direct business efficiencies. By efficiencies I mean improved revenue or reduced cost.

Secondly, I don't think it's possible to "AI-proof" your career since there is no consensus on how AI will be integrated into our daily work flows. There are editor plugins to generate snippets of code directly; you can generate entire pages, sites or applications with a single prompt; you can provide code to debug; and then there are projects working to integrate AI into existing tools, like the project to have AI generate code based on pull requests in Github.

Imo, the best part of software development is the continuous learning you must undertake in order to stay relevant in this field. If you want to stay in this field then start learning what is happening and how best to apply it to your job/role/project/department. If you are the one leading the charge then you're probably not the one they are going to get rid of when they start needing less developers.

Or maybe your best course of action is to find something new. You have a lot of career left in your life, perhaps a field you feel less anxious about would be better for you. My brother-in-law just finished obtaining his commercial pilots license. A lot of people told him it was a bad idea because he's in his mid thirties which is "too old" to start being a pilot; also a field which AI could imminently take over. But it's his dream and that's what he decide was best for him.

obpe··on Ask HN: When has knowing advanced math been useful in your job/life?
I have used non-Euclidean geometry to implement an approximate distance calculation. I have used calculus to implement control logic.

I have also worked with amazing developers that couldn't do simple addition in their heads.

Math is an extremely powerful tool that most people do not understand how to use and thus do not "need" to use.

obpe··on Ask HN: What's the best tech stack for indie hacking?
My go-to stack is Node and React.

The fastest is the one you already know. The cheapest is the one you don't use. More scalable requires more complexity. More modern is probably completely useless until it's not modern anymore.

This reminds me of a technical discussion I was involved with regarding picking a language to develop a microservice. We chose Java because the vendor recommended it for easier integration with their service. It turned out they didn't have a Java library, it was just an HTTP API and nothing about the integration was made easier by using Java. The vendor just only worked with Java so that's what they recommend. I was an advocate of C# primarily because that's what we use in our other services.

Anyway, my point is "faster/cheaper/scalable/modern" are marketing terms and you should be wary of anyone selling you a solution based on these.

obpe··on Ask HN: Australia vs. Canada for an aspiring software developer
I am very biased as I am Canadian and have lived in Canada my whole life. However, my wife is Australian and I have visited many times. We have looked into moving there and the only thing that really stops us is our pets due to the significant quarantine requirements.

I would say Canada's tech sector is larger, mostly because of our proximity to the States but Australia has a very large and vibrant tech sector; like most places, mostly found in the major cities: Sydney and Melbourne. When I have looked for work there I have found no shortage of jobs opportunities. However, I have not looked during this most recent economic recession.

Do you plan to become a citizen? If so you may consider the politics of each country. In the grand, Canada is more liberal whereas Australia is more conservative. However, both offer significant social services.

Do you plan to travel? Asia is closer to Australia, with Tokyo being nearly equidistant between Sydney and Vancouver. Europe is closer to Canada, especially Eastern Canada where many major/prominent Universities are located (I went to school on the West Coast so I don't endorse those schools).

Do you plan on working in the States? I really don't know about how this works from an Australian perspective but US based companies have had no issues with my Canadian education and current place of residence (Canada and the US allow for fairly easy migration of professionals through our free trade agreements). I would assume Australia has similar, if not identical, standing but this may need further investigation.

What matters to you in your life? I think you would be equally happy regarding education and work opportunities so I would look at other priorities.

obpe··on Climeworks removed CO2 from the air and put it underground
This kinda seems like a good idea for rich countries, like Switzerland and Iceland, that are carbon neutral; particularly in their energy generation but this may be actually terrible.

The article mentions they have raised $780 million. If they instead bought BEVs, say at $35,000 each, they could have purchased 22,285 vehicles. If they simply swapped those BEVs for people's ICE vehicles, assuming 4.6 metric tons per ICE vehicle, they would save 102,511 metric tons of carbon per year, 2.8 times the amount they are going to extract with their largest plant.

It is unclear whether this $780 million is the total they have raised or the amount raised for the new plant alone.

obpe··on Google Says Supreme Court Ruling Could Potentially Upend the Internet
Wouldn't HN also have to stop hosting comments?
obpe··on The Gas Stove Problem
I think requiring proper ventilation would be enough to force most installations to choose electric because it will be the least costly option.

The house I own came with a gas stove and a vent that vented inside (the previous owner said it vented outside...). It cost nearly $800 to have it properly vented to the outside. I think the vent itself was $400 but that's based trying to figure it out which model we had. The thing I do remember about the vent is that it has 3 settings and only the highest goes above the recommend CFM.

If the installation of a gas stove is going to entail an addition of $800 to $1200 (could be cheaper for a builder), why would they choose this option unless they knew they could charge a premium for the home?

But I do concede the elimination of gas stoves is beneficial for the environment as well; and, imo, is a much better argument than the manufactured moral panic around asthma in kids.

obpe··on A US federal agency is considering a ban on gas stoves
It's funny to me how people compare how hot each type of stove gets. Even when I sear a steak, and I like my steaks blue, I barely go above medium on my gas range.

Imo, the best thing about gas is the continuous nature of the output and significantly greater range of temperatures gas can hit, ie much lower than electric and induction. I think it is imperative you have a proper ventilation.

I don't like banning things, and think that mandating proper ventilation would be akin anyway, but given it would reduce carbon emissions and fire risk maybe it does make sense for an outright ban.

Honestly, "for the children" is the weakest argument for the ban.

obpe··on Brokenism - The real debate today isn't between the left and right
I am an atheist and a Canadian so we definitely share divergent thinking.

I agree the left is dominant in those areas of our culture. I think this is due to the highly concentrated populations of liberals versus the vastly spread out conservatives. And this mechanism is shown in another area of important cultural power: government. I would say liberals and conservatives are pretty equal in this consequential area. I worry about conservatives controlling our governments because I don't think they would try to compromise.

I just watched Pleasantville; another great liberal take on the conservative mindset.

obpe··on Maye Musk on the Emerald Mine Myth
It took 5 seconds of googling to find a statement from Errol, Elon's father, that confirms he did own an emerald mine but also claims it collapsed in 1989.
obpe··on Need suggestion on be a full remote SWE
If you don't have a remote position already then I would suggest you make it clear to any potential employers this is your intention. I have been working a remote job for many years and I only recently found out I am required to be in either Canada or the US. I had no intention of leaving but it was always something I thought I could do until I found this out.

Then make sure you have good equipment and by that I mean stuff that you can work on anywhere. Maybe taking your work to a local coffee shop to test out how it feels. Personal I have a very hard time typing on a small keyboard as a larger gentleman. I take my keyboard with me when I travel for work, which I luckily don't do a lot.

Then you may need to plan your trips carefully. You may be without internet for days if not careful. This may not matter but if you hit a deadline while out of service your employer may not be happy about your lack of foresight.

Finally, if being alone is a concern then don't do it alone. You could find someone who wants to go with you, or just meet people as you travel by staying in hostels or what have you. Travelling by yourself will be lonely but for me that's a good thing.

obpe··on Ask HN: Best way to target both Android and iOS in 2023?
I don't know anything about including OpenGL/ES but I have worked with react-native in the past and it worked well for a pretty simple CRUD app that was a 90/10 read/write ratio. It was built by a team with lots of react experience.

If I were to start today I would try out Flutter but I have never worked with it.

obpe··on Brokenism - The real debate today isn't between the left and right
I would say the opposite is true. Brokenists see America as so broken it is not worth fixing and instead should be burned down and built anew. Status quoists see America as flawed but worthy of being fixed.

On the other hand, liberals and conservatives are basically the same these days. Since the only thing I hear from either of them is how the other is your enemy, trying to destroy your way of life, grooming your children, stripping your rights, policing your speech, etc.

To be clear, I am a liberal and do think conservatives are "worse" in this regard but you would have to be pretty willfully ignorant to not see the liberals doing the same.

obpe··on Why don't unused domains have an expiration?
Just wait for renewal and snipe it before they renew. I have been able to get several squatted domains this way.
obpe··on Solar’s dirty secrets: How solar power hurts people and the planet
I didn't make it clear but I think we should be building nuclear today. But that doesn't change the fact that there is little inertia on moving forward with nuclear.

All these discussions centre around changing policy but I have heard very little about actual change happening. Further, we have very little expertise left regarding building nuclear plants so even if we could start building as many reactors as we want, how would we? Then there are the financials, which are heavily compounded by the policy and lack of experience.

Since we need the policy to change to build more, we need to build more so we can actually predict the costs/time, and we need to predict the costs/time for the financials to work... And nothing seems to be being done any of it.

How exactly can nuclear be built in the current status quo?

obpe··on Solar’s dirty secrets: How solar power hurts people and the planet
This has been studied and solar still comes out ahead. This article seems to not consider the literal thousands of tons of cement and steel required for a natural gas plant. Both of which carry the same mining and smelting baggage that the rare earths come with. At least with nuclear there is clean energy as a result but it will take decades before we can build any nuclear and we can not wait.

https://www.nrel.gov/analysis/life-cycle-assessment.html

obpe··on HTML is all you need to make a website
Sure, this is fine for a simple hobby or personal site. But businesses add a lot of extra junk to their sites for their own benefit not the users.
obpe··on Is discourse on capitalism and it's alternatives possible without bias/dogma?
Imo, part of the problem with these discussions is the terms, capitalism and socialism, have been stretched to mean much broader things than "private" vs "public" ownership. If you use the original definitions, than Denmark/Sweden are not very socialist at all; at least compared to China/Venezuela where the state (ie the public) owns a lot (this has nothing to do with whether the actual governments are democratic or not).

In theory, there is no government in a purely Communist state. In theory, since everyone has everything they need, there should be no conflict. This has never actually worked in practice (see any study about hippie communes, aside from the fact no nation has every gone that far).

For those Northern European countries, having high taxes and many more decommodified markets (like health care and education) are more about the "Welfare" state than capitalism vs socialism. Tho many people take about this as "socializing" the cost, it doesn't really have anything to do with socialism the economic model.

obpe··on Marijuana users more prone to infections after knee, shoulder surgeries
Yeah, except there were only 22,000 cannabis users so it's actually 220 people, not 10,000.
obpe··on Have we simply stopped the process of innovating new things that solve problems?
> no one has made highly comfortable yet very inexpensive N95 masks

Because faces have a huge range of variance so the only solution is custom make masks. Technologies like additive manufacturing could solve this but like all new technologies it will take time to bring the cost down. So really, why don't they make cheaper 3D printers? So simple!

> no one has invented a fool-proof vaccination that completely prevents infection

Literally impossible!

> No one has innovated a cost effective way to update office ventilation properly, and workspaces to prevent the spread of contaminants

I do think this hits a large point because I see it from the perspective of business. Much like FAANG, if a competitor came out with a better, cheaper product just buy them and destroy the product. Free market at it's finest.

obpe··on Custom JavaScript controls can't capture the nuance of form fields (2021)
I have implemented many custom form controls. The reason is almost always because the design requires it. But other reasons can be to "improve" the control; for the select box to make the invisible edit buffer visible. I appreciate this is not the way but it is also pretty annoying how limited the styling, and customization, of form controls is.

We use Angular so it's pretty easy to hide the custom control and have a plain control for accessibility. At least for checkbox and radio inputs, am I the only one that uses a hidden input to control the style of some div to make it look fancy like the design required?

obpe··on Scientist busts myths about how humans burn calories
That's very interesting because with some more napkin math...

If we assume 3500 additional calories is 1 lb of fat stored on your body, then 3500/300 = 11.6 days you gained 1lb

Assuming 6 months is 180 days, then 180/11.6 = 15.5 lbs over 6 months

obpe··on Can we just be done with passwords?
I wouldn't call you crazy but I would call you naive.

There are 3 factors, that I know of, for proving your identity: 1) Something you know (password) 2) Something you have (phone or email) 3) Something you are (fingerprint)

Your proposal is to do away with 1 by relying upon 2. But the issue is the very nature of "having" something means it can be taken from you and, on the internet, quite possibly without your knowledge.

Further, your proposal essentially asks the user to completely trust every hop along the path an Email or SMS will take. You may be able to mitigate this by using an app but this is a significant step for many and not everyone has a smartphone.

So while your proposal may work for a tiny, inconsequential web site or service which contains nothing of importance (which begs the question why you have a login to begin with), I would never trust anything to a site that implements this.

← PreviousPage 2 of 2