Better HN
topnewbestaskshowjobs
Log inSign up

langcss

233 karma · joined Apr 24, 2024 (2y ago) · 207 submissions

Submissions

comment 2y ago · link · parent

Would a simple cruise ship ticket do it? Or be too lit up at night?

comment 2y ago · link · parent

Let's say you trust absolutely that the network tab would reveal any communications with the server that could happen in the future. By "future" I mean the point where you are convinced that it is safe to use, and now you are using it with real data.

If you had done this, even spending 10 hours looking at network traffic, you wouldn't have been protected from this hack: https://www.theverge.com/2018/4/24/17275982/myetherwallet-ha...

That was a technically sophisticated hack, but there are simpler ones, like social engineering someone to take over their site.

Put putting hacks aside...

Say you have a site and it doesn't mention whether the data is sent to a server and you want to find out. Now let's say that site does a backup to server but only when localstorage has run out of space, but you don't know that.

When you test the site in the network tab, and you haven't run out of localstorage space then you will see no XHR and assume it's all good, it never sends to the server.

You then use the app for a few days, hit the localstorage limit and it sends stuff to the server without you knowing. And yeah you can keep the network tab open all the time if you have the discipline, but you only know once your data has been sent. It is too late.

If you care enough about whether it sends stuff to the server to look at a network tab, then you probably care enough to want to know for sure.

With the web as it is now there is only one way - trust the site and hope they do the right thing, and are secure. Or only put stuff on there you are happy to leak.

So, made up situation: if you are using this tool to edit and release a whistleblowing related video as a journalist. Maybe you shouldn't!

You probably instead want a local app, running on linux, on a machine that is disconnected from the network.

comment 2y ago · link · parent

Yes you are right. There is nothing wrong with the network tab in those browsers but you may not reach all code paths in your quick (or lengthy) test.

Future behaviour may be different.

Also on the web code can change. Either the site owner or by a hacker. There is value in checking network requests if you need to but it isn't fool proof.

comment 2y ago · link · parent

It only shows past behaviour so not completely a proof that nothing could be sent.

comment 2y ago · link · parent

Canberra is heavenly in terms of number of trees. Acres of parkland, farmland or wild bush near every part of the city. As well as treelined streets.

comment 2y ago · link · parent

I disagree. Take code generation. Right now stackoverflow wins on correctness but your question may not overlap entirely with the asked question. LLMs answer your actual question but you sacrifice correctness.

So there is a tradeoff so Generative AI is more useful in many circumstances.

AI is getting more accurate with time not less. It is using less energy per byte with time too for a given quality.

Guess where things will be in 2030?

comment 2y ago · link · parent

That would be like making a constant for every nuget package/version tuple: unworkable because new versions and packages come out all the time.

Or making constants for every device manufacturer you can connect to via web Bluetooth.

comment 2y ago · link · parent

Let alone temperature, max tokens, system, assistant, user, functions etc.

comment 2y ago · link · parent

That is cool! I turned to ffmpeg to reduce the size of some family videos because despite the command line it was possible whereas the Windows flavour of the year editor just can't do it.

This made me think that hey why not use it for all video editing needs! Although harder to use than a UI the commands will be the same in 2050 as they are now! Plus it is scriptable.

comment 2y ago · link · parent

Well done on building this.

I can see this being useful, devil is in the details of how good the UI is. I don't use Python yet for LLM stuff but I may do in the future (for other reasons). But something like this might be useful to me.

The sticking point for me is I prefer to use open source not because of course but longevity and control reasons.

comment 2y ago · link · parent

Typescript also differentiates between checking and compiling as two different steps.

So you could return something from a void function and use it and that will compile to JS and work but only the compile time type check would fail.

Highlighting that of course TS has no runtime checks of types.

comment 2y ago · link · parent

The Json serialisation and serialisation of undefined fields is a bug then? Since it changes the meaning.

comment 2y ago · link · parent

It is a neat idea! Because often the point at which you need to add a todo you are doing it because you don't have time to do it now. Which means the screenshot UI is quick way to get the information stored (like an email, calendar appointment, or text message or photo). I see myself using it.

comment 2y ago · link · parent

I wish I knew about this in the microcomputer days. I started off with SIN() and COS() for circles which were very slow. I realized that you can just scan down a pixel at a time in the Y axis and use Pythagoras for the X. Also for a circle that calculation does 4 points.

But the way posted here would much much faster than that!

comment 2y ago · link · parent

It is a developer time tradeoff. If your app is mainly forms and not that interactive a framework like this would be OK. Internal crud tools would be an example. But you can’t use it for everything (you can’t use any framework for everything!)

comment 2y ago · link · parent

No “blog”? (6018)

comment 2y ago · link · parent

If Node is your backend then JS is what you need to use. Whether directly or via Typescript.

JS is just the language. Avoiding JS on the front end is more about avoiding front end code, state management, mutations, a11y issues, frameworks etc. rather than the JS language itself!

comment 2y ago · link · parent

DHH may buy it :-)

comment 2y ago · link · parent

Warm take?

Just reject and ask for an explanation OR pair with the coder to have them explain the code.

If the reviewer can’t understand it without an explanation the rest of the team can’t understand it unless they git blame then ask the coder, assuming they are still at the company!

The “dump 1000 lines of previously unseen and undiscussed code as a code review at a reviewer” method is an antipattern.

Either the reviewer should be heavily involved or break it into smaller, well explained chunks with design documentation to point to.

This saves everyones time in the long run.

comment 2y ago · link · parent

ORMs are useful though for a different reason. They let you creat typed objects then generate the schema from them and automatically create a lot of boilerplate SQL for you.

Admittedly for anything more than 1-2 joins you are better off hand crafting the SQL. But that is the exception not the rule.

Refactoring DB changes becomes easier, you have a history of migrations for free, DDL generation for free.

In the early 2000 I worked where people handcrafted SQL for every little query for 100 tables and yeah you end up with inconsistent APIs and bugs that are eliminated by code generation / meta programming done by ORMs.

comment 2y ago · link · parent

Yes I think docker is not suitable for non technical people.

Running docker locally usually means messing around, sometimes troubleshooting and restarting the daemon.

Even if you make your app handle all the commands. It’ll end up not working and the user will give up. Even their technical relative may not be able to fix it!

Instead I would probably make the effort to create seperate Windows, Mac and Linux builds.

If it is a pure Node app for example this might help: https://nodejs.org/api/single-executable-applications.html#s...

There are probably similar options on other stacks.

comment 2y ago · link · parent

I think it is like coin flips, do enough of them and the total heads or tails gets very predictable even though individual flips are not.

comment 2y ago · link · parent

For after effects they offered monthly, monthly with commitment and annual. Same pricing structure as a gym. I guess they need to make it clear but it was clear to me that a cancellation fee applied.

comment 2y ago · link · parent

    const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";

comment 2y ago · link · parent

Thanks for taking the time!

The conflict for me here is I don't want to use a template and look like everyone else. On the other hand I do want it to look good. I'll consider your points.

comment 2y ago · link · parent

Thanks, I only knew about execution plans after doing a DB course, so understood!

comment 2y ago · link · parent

Did you check the execution plans before and after? Probably caused a different plan that happened to be faster by luck.

comment 2y ago · link · parent

If you are strapped for time maybe try https://www.cursor.com/ or similar offerings that do some of this for you.

Chatting with GPT4 and pasting into your editor code or pasting into a terminal some commands could also help alot.

1234567