Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
quadcore
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
38 ms
·
421.
▲
by
quadcore
7y ago
Let me tell you about one of my personal stories. The project I got transferred to was the thing of nightmares. Not deterred, I hacked into it a shitty solution and shipped it very fast. I shipped it so fast that suddenly I had everyone
422.
▲
by
quadcore
7y ago
To have a feel of long period of time, I always use one metric: my grand father. He's lived 93 years, so almost 100. 2000 years ago was then 20 grandad away. Not so long ago after all. 200K ago is 2000 grandad away. Quite some time but
423.
▲
by
quadcore
7y ago
an area where every interaction is a performance Feel ya. Surprisingly enough, I'd say that I've not had to attend so many boring meetings in my career but certainly I'm just lucky. Also, once I did get a manager who was an
424.
▲
by
quadcore
7y ago
Agile never gave organizations a holistic, viable alternative to Waterfall. Because there’s a difference between theory and practice. Product work is more about practice. When we complain about “AINO” (Agile In Name Only), we’re not being
425.
▲
by
quadcore
7y ago
This is how I write it: def contains_3(xs): """Returns True if the given list contains a 3.""" found = false for x in xs && !found: found = x == 3 return
426.
▲
by
quadcore
7y ago
An interesting conjecture I've made during this discussion is the following: can early returns be responsible for over-engineered code? Think about it. If it's acceptable for programmers to use early returns then they can't
427.
▲
by
quadcore
7y ago
don't you end up with functions doing lots of state/variable mutation (within the function)? Good question. This is true, but this is a programming language bug. In some programming language you can write the equivalent of retu
428.
▲
by
quadcore
7y ago
If you interested by what I'm saying, you should try removing all returns, continues and breaks from your code
429.
▲
by
quadcore
7y ago
Or is it that you (guys) can't have bigger functions because you impulsively fill them with early returns? So you end up over-engineering things just to avoid bigger functions (because you can't have them because they are filled w
430.
▲
by
quadcore
7y ago
I guess I should explain that expressiveness leads to better decisions which leads to better code. In short, what I'm saying is that you will end up with a totally different program.
431.
▲
by
quadcore
7y ago
This whole guard/validation thing is a fabrication of the mind. Because early returns do returns something on an invalid input. If anything, those validations should be asserts/exceptions .
432.
▲
by
quadcore
7y ago
massively edited. very interesting, thanks for the comment They are literally goto end . It used to be done like that a lot actually. I suppose I could get rid of early returns with a variable and breaks, but is it worth it? Very good
433.
▲
by
quadcore
7y ago
As, with everything, it should be applied wisely. Early returns is not a feature of the language. It's an artefact of assembly language. You have no reasons to use it in the first place. In most cases, I think it is perfectly fine t
434.
▲
by
quadcore
7y ago
Wrong, because once you would see the code with the if statements, you would discover bugs and that the logic is convoluted. You would refactor it into a much simpler program.
435.
▲
by
quadcore
7y ago
return pos < this.length() ? Some(value) : Nope See, mine is already way more simple than yours. This is my point, if you force yourself not to use jumps, you will end up with simpler and better programs. Also the second example
436.
▲
by
quadcore
7y ago
return rawData && rawData.length > 1 ? rawData.map((item) => item) : [] In many other cases, I would use a result variable. It's more expressive and more importantly you can move that code (the result variable
437.
▲
by
quadcore
7y ago
I'm very surprised that early returns are still commonly used and advocate in 2019. In my opinion, they are obviously terrible. I'll try to convince you. First the practical, in my experience, a big function with many early return
438.
▲
by
quadcore
7y ago
It was a little hack; we didn't crossed the limit of decency imo.
439.
▲
by
quadcore
7y ago
Same experience here in France. One of the trick we used was to overprice our salaries so we could reinvest those salaries in the company in order to have way more runaway than initially planned. That's until a tax controller came to t
440.
▲
by
quadcore
7y ago
Is the only reason to create a startup to experience exponential growth and get really rich and have your own stock symbol? Nope, the main driver is the feeling of being on a mission.
441.
▲
by
quadcore
7y ago
Can you elaborate please? How do you avoid a grizzly?
442.
▲
by
quadcore
7y ago
Provide colour-inversion buttons to help reduce visual impact I was thinking also about blurring the picture/video.
443.
▲
by
quadcore
7y ago
Video games are not like movies, not like content. Since their inception, 1% of the games get 99% of the players. For example, when half-life was released, everybody was playing half-life. In this environment, you can't simply make a
444.
▲
by
quadcore
7y ago
I recently took a look at which of the large US airports had the greatest delays/early departures Haha nice. It could be interesting to have the same map for # of flights and some others, and from there, determine a map which indicat
445.
▲
by
quadcore
7y ago
Django meet Kill Bill. Can't wait a good movie on that story.
446.
▲
by
quadcore
7y ago
Culture matters. So what you're saying is that humans have no rights. If humans have rights, then there is a point where culture doesn't matter.
447.
▲
by
quadcore
7y ago
Here is the lesson I gave a friend at a bus station waiting for a bus. First explain how a computer works in very basic terms because most people don't know. Don't assume they know how a cpu, how memory, or their screen works, eve
448.
▲
by
quadcore
8y ago
Paper: https://www.microsoft.com/en-us/research/uploads/prod/2019/0...
449.
▲
by
quadcore
8y ago
In Go, time.Sleep don't hold the thread. That's the cool part. In Go a noop gives the control back to the scheduler which will then reuse the thread for any goroutine that needs cpu -- ie. one that isnt noop-ing. So if you sleep o
450.
▲
by
quadcore
8y ago
I/O is exactly the kind of stuff that should happen smoothly in goroutines or go blocks. It's kind of the quintessential case because I/O has a lot of sleeps and waits ( noop or stalls in other terms). When you're d
More ›