Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sfn42
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
571.
▲
by
sfn42
1y ago
Be competent and able to prove it. Work with in-demand tools - for me that's .NET, React, Azure, SQL dbs etc. For others it may be go, python, java, AWS, GCP whatever is in demand near you. Probably not Rust, C or C++ etc - I'm s
572.
▲
by
sfn42
1y ago
for i in range(n - 1): Is pretty much a standard for loop. Between that and for n in numbers: You can do pretty much the same things as a more conventional language. You could also solve it pretty simply like this: expected_sum = (n * (n +
573.
▲
by
sfn42
1y ago
I've always had reasonable interview questions. Get some data from an API and display it in a table. Make a class that can store car data and get them by plate number. Make a class that calculates tax based on a bracket system. I haven
574.
▲
by
sfn42
1y ago
Even if it is hundreds or thousands the difference will generally be imperceptible to humans. And that's all I care about, I care about how humans experience my software. If some background job that runs nightly takes 2 hours that'
575.
▲
by
sfn42
1y ago
Because one does not just profile their code. It branches, different parts do different things. You need to run the code with sensible input, multiple different inputs to hit the different branches etc. If you have a good workflow that incl
576.
▲
by
sfn42
1y ago
Yeah, I have that problem right now. A colleague and I recently took over development of an application that two others have started. It's not even in prod yet but everything is slow. Loading a page can take up to a minute. The reason
577.
▲
by
sfn42
1y ago
I use lots of libraries and it works fine. Popular libraries are usually written by competent developers, some times they will even tell you the time complexity of a function in the documentation. Most of the time library code won't be
578.
▲
by
sfn42
1y ago
Nice work! The example I used was based on a report I looked at once. The two lists were 50k and 80k elements respectively, the report took nearly 30 minutes to generate. Changing two lines of code to make a dictionary instead of a list and
579.
▲
by
sfn42
1y ago
> O(n) is worse than O(n^2) for small n. It can be , it isn't necessarily. And I don't care about small values of n. If I'm spinning through two lists of size 5 it doesn't matter if option A is slightly faster than o
580.
▲
by
sfn42
1y ago
This is a bit different because C# is designed and implemented by industry experts - far above the average code monkey in terms of skill, understanding and experience, with added help from community experts, and the software in question is
581.
▲
by
sfn42
1y ago
I completely disagree. If the program doesn't have "hotspots" then it's probably pretty fast and it's following Knuth's advice. But in my experience most applications are completely littered with "hotspots
582.
▲
by
sfn42
1y ago
That's because people don't get it. You see people saying things like "It's pointless to memorize these algorithms I'll never use" - you're not supposed to memorize the specific algorithms. You're sup
583.
▲
by
sfn42
1y ago
I completely agree with most of what you've said, but personally I rarely use a profiler. I don't need it, I just think about what I'm doing and design things to be fast. I consider the time complexity of the code I'm wr
584.
▲
by
sfn42
1y ago
Well said. Another example of this is using the right algorithm for the job. I see a lot of code like let's say you have two lists and you need to go through the first one and find the corresponding element by id in the second. The nai
585.
▲
by
sfn42
1y ago
I think that's more relevant with really large vehicles. An SUV is generally somewhere in the range of 1.5-3 tons whereas a loaded semi truck can weigh up to 40 tons. If a road is designed to handle 40 ton vehicles then i have a hard t
586.
▲
by
sfn42
1y ago
Java has mice? I thought java had maven and Gradle? Is mice a new thing?
587.
▲
by
sfn42
1y ago
Pretty much everything most user-facing apps do generates time values. Maybe it's more accurate to say any time a user actually inputs a date and time. Stuff like scheduling and booking software definitely needs to consider these thing
588.
▲
by
sfn42
1y ago
You're completely right, for these niche cases it matters. I'm not saying you should indiscriminately apply UTC to every problem, I'm just saying usually datetimes should be stored as UTC. And the reason I feel the need to sa
589.
▲
by
sfn42
1y ago
I have never worked on a system where simply storing everything as UTC isn't a perfect solution. I know they exist, but I would say those are niche. And even for applications where you can't just use UTC for everything and be done
590.
▲
by
sfn42
1y ago
Iran and Israel were allies before Iran was taken over by religious leaders. Even after that, Israel tried to keep the peace hoping that reasonable people would take over again but they never did. Iran has been supplying and funding Hamas a
591.
▲
by
sfn42
1y ago
You just have to be more specific. Don't just tell it to refactor, tell it how to refactor. I usually start out a bit vague then I add more specific instructions when I want specific changes. I often just make the changes myself becaus
592.
▲
by
sfn42
1y ago
I completely understand that. You just haven't mentioned it until now. You could also look for inefficiencies in the search. Maybe the query is inefficient, maybe you can make use of database functionality such as full-text search and
593.
▲
by
sfn42
1y ago
I'm not claiming to eliminate network transfer times. Sending a web request takes some time. But it doesn't take seconds, it takes anywhere from a few to a few hundred milliseconds, given that the request size is relatively small.
594.
▲
by
sfn42
1y ago
I'm currently working on one of those wonderful greenfield projects where the monkeys who put it together made these mistakes I describe and everything is slow. Website isn't even in production yet and everything takes 5+ seconds
595.
▲
by
sfn42
1y ago
I didn't say it was good, I said it was fast. Those two things are often correlated though, the app described above certainly doesn't fit my definition of good. Computers can do unfathomable amounts of computation in the blink of
596.
▲
by
sfn42
1y ago
Just like a person would. If you want it done right you have to do it yourself. Or you have to tell the LLM exactly how to do it. Often I find it easier to just do it myself rather than list out a bunch of changes. I'll give the LLM a
597.
▲
by
sfn42
1y ago
So it's basically Mongolia's answer to the Finnish sauna
598.
▲
by
sfn42
1y ago
Nope, not accusing you of anything friend.
599.
▲
by
sfn42
1y ago
I agree, it's definitely about the self. That's what psychedelics are to me, they're a way to explore the self. Seeing things from a new perspective, unlocking new ways of thinking. Seeing yourself in a different light. It&#x
600.
▲
by
sfn42
1y ago
Yeah I encourage people to study and research things. Nothing wrong with that. Just don't make shit up and present it as facts that's all.
More ›