Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wizofaus
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
241.
▲
by
wizofaus
3y ago
Not sure why it's not "Percentage of decimal" though?
242.
▲
by
wizofaus
3y ago
Out of curiosity, what was the motivation for the conversion? And did you use a tool (ChatGPT even?) to help?
243.
▲
by
wizofaus
3y ago
> If C++ is so good why does it need to be constantly updated and extended? You could make that argument about almost any technology (certainly in the IT world). C23 is out this year which will make it the 6th "official" versi
244.
▲
by
wizofaus
3y ago
I'm sure there are similar lists of why Javascript developers should avoid writing 1st class functions at all costs and stick to arrow functions. I can't say I've ever understood them and the first stack trace you get when so
245.
▲
by
wizofaus
3y ago
Ok I admit to feeling a bit stupid now - you're absolutely right of course. On that basis I don't see why it should be necessary to declare private method signatures inside the class definition at all. I can't really see an
246.
▲
by
wizofaus
3y ago
So you're saying it's perfectly fine for someone to use any class from any library (including the standard library) and define their own "implementation" private methods for such classes, that then access implementation
247.
▲
by
wizofaus
3y ago
> What's the value in publishing something that is never replicated? Because it presents an experimental result to other scientists that they may consider worth trying to replicate?
248.
▲
by
wizofaus
3y ago
Have there been any studies showing, e.g. correlation between having been exposed to programming techniques at an early age and better critical/ logical thinking skills later on in life? I'd be surprised if there were none, but eq
249.
▲
by
wizofaus
3y ago
Agreed, found myself looking for the "like" button, something I virtually never click/tap when it's the first thing in your face at the bottom of a social media post.
250.
▲
by
wizofaus
3y ago
> NHS so no money to be made by referrals afaik I wouldn't assume that - just because the money isn't coming from your pocket directly, it's inevitable there are doctors that milk the system. But you'd think bureaucr
251.
▲
by
wizofaus
3y ago
The whole point of private methods is that they have privileged access to the implementation details of the class (i.e. private member variables and other private methods). So there still needs to be a restricted place they can be defined -
252.
▲
by
wizofaus
3y ago
Interesting idea, can't say I've used that pattern used, and obviously the code will end up slightly more verbose (no automatic "this" argument) but in principle could be better than the pimpl technique.
253.
▲
by
wizofaus
3y ago
Private methods do need to be in some sort of privileged "single source of truth" for the class definition though - if you were permitted to have a partial class definition in the "public" header file that defined publi
254.
▲
by
wizofaus
3y ago
I learned to program, even in assembly, before quality debugging tools were available (or I knew about their existence), so very much relied on "debug manually using log output". But once proper debuggers were a thing and I learne
255.
▲
by
wizofaus
3y ago
It strikes me as something of a language flaw that without pimpl any addition/removal/ modification of private member functions, or even renaming of private member variables triggers full recompilation of every source file that ne
256.
▲
by
wizofaus
3y ago
> the other western states But the midwest is not the western states...?
257.
▲
by
wizofaus
3y ago
The code club lessons come with fairly explicit instructions that tell the kids what they need to do - mostly they only need help from the tutors when they can't find something (e.g. a particular command in whatever IDE they're us
258.
▲
by
wizofaus
3y ago
Honestly the most important thing is that the names convey something meaningful to the other developers working on the codebase - so if in doubt ask them! I'd also say names that are easily searchable are that much easier to work with.
259.
▲
by
wizofaus
3y ago
It can still be a lack of effort put in trying to convince product managers etc that more time is needed! But almost all PRs I review have something in them that suggests the developer not putting as much thought/care into what they we
260.
▲
by
wizofaus
3y ago
As someone who does this regularly as a code club volunteer I'm not sure I see much useful advice there. Honestly the biggest challenge is accepting that within a group of kids the same age there'll be enormous variation in abilit
261.
▲
by
wizofaus
3y ago
> I think devs in general sweat too much about code quality I think if they sweated a little more then poor quality code wouldn't find itself into the codebase.
262.
▲
by
wizofaus
3y ago
> looking for gaping security holes is premature optimization. I won't approve a PR if I notice such a thing (and if it really is "gaping" I'd expect an automated tool to flag it and fail the build anyway). I don'
263.
▲
by
wizofaus
3y ago
But the carmarker is surely within their rights to refuse to continue servicing your car, or declare that any attempt at modifying the electronics/software potentially makes it unroadworthy. Having said that, I don't entirely un
264.
▲
by
wizofaus
3y ago
Indeed...laziness in both cases! I certainly admit I've been guilty of "ooh this function already exists to do this, except in this case I need to tweak it slighty, so I'll just add another parameter" - which is usually
265.
▲
by
wizofaus
3y ago
> If companies in Country A move some jobs to Country B [...] is the world really worse off? If the only change is salaries then no. My only objection to offshoring is when the conditions the workers are expected to endure are clearly f
266.
▲
by
wizofaus
3y ago
> Repetition usually requires less work over short time scales but often requires more work over longer ones Yes, that's been exactly my experience, and not by a small amount either.
267.
▲
by
wizofaus
3y ago
But the divergence is more often than not unintended and causes inconsistent/ unexpected behaviour when a change is made in one copy and not the other, which is why it ends up using up more time in the end. And how is extracting a few
268.
▲
by
wizofaus
3y ago
I hate repetition because it's nearly always laziness - it takes less thought/time to copy and paste a few lines of code than it does to factor them out into a reusable function and decide where to put it (and with what name). I&#
269.
▲
by
wizofaus
3y ago
> but this is what our brains evolved to be good at. Really? Personally I find having to learn a new written script is one of the biggest barriers to learning a new language. Despite years of exposure (admittedly at low intensity) I stil
270.
▲
by
wizofaus
3y ago
In Australia at least there's been a government sponsored advertisement campaign "Every cigarette is doing you damage" that rather obviously conveys smoking as an unpleasant "shameful" habit, while graphically descr
More ›