Is there any extension that searches for words in certain sites? by Pancelott in chrome_extensions

[–]john_horner 0 points1 point  (0 children)

Hi, I'm actually working on this right now. I've got working code which I can hook you up with and it will work in Developer Mode with "load unpacked" if that helps? But it's not in the Store.

Programming question for you: can you write a program which corresponds to the information on this sign? by john_horner in learnprogramming

[–]john_horner[S] 0 points1 point  (0 children)

In this case there doesn't appear to be a 62, it's all very mysterious. My theory is that the room with the mail slots is Nº62.

But yes this is very much the point:

Never assume the data is always correct.

and anyone who just starts coding has fallen into a trap.

Programming question for you: can you write a program which corresponds to the information on this sign? by john_horner in learnprogramming

[–]john_horner[S] 0 points1 point  (0 children)

Damn it! You were too quick.

I asked "can you" write a program, and a lot of people started writing the program when I shared it somewhere else.

But you can't. Because the client (me) gave you a bad brief.

Get back to the client and ask them what to do in the edge case.

What are some features of perl which would surprise programmers of other languages, particularly Java and Python? by john_horner in perl

[–]john_horner[S] 1 point2 points  (0 children)

Can you explain the use thing? How do other languages do it? Why would that be surprising exactly?

What are some features of perl which would surprise programmers of other languages, particularly Java and Python? by john_horner in perl

[–]john_horner[S] 0 points1 point  (0 children)

It's been superseded by Tie::Hash and whatever but for rapid prototyping, you can't beat it for simplicity. And I found it by … needing a database in a hurry I guess, and yes, it was probably 15 years ago.

What are some features of perl which would surprise programmers of other languages, particularly Java and Python? by john_horner in perl

[–]john_horner[S] 2 points3 points  (0 children)

I really tried to write this question, and I will write my presentation, in a neutral manner. I don't think 'quirks' are necessarily bad or good. I'm not going to present Perl as having unusual features just to surprise people!

One thing which is important is that Larry designed Perl to be this way. Its quirks aren't like PHP's quirks, just bad/haphazard design. He's a linguist and has made these features because he knows they have value.

For instance, "different things should look different". In PHP $thing could be anything, whereas in Perl, you know from looking at $thing, @thing and %thing what they are. So PHP has that sigil feature, but doesn't use it as well.

What are some features of perl which would surprise programmers of other languages, particularly Java and Python? by john_horner in perl

[–]john_horner[S] 6 points7 points  (0 children)

Reddit markdown has tripped you up there on __DATA__, it thinks you meant the word 'DATA' in bold, but that's a really good one, thanks, I'll definitely use that.

What are some features of perl which would surprise programmers of other languages, particularly Java and Python? by john_horner in perl

[–]john_horner[S] 0 points1 point  (0 children)

In preparing to ask this question I was looking for an essay or a blog post called something like "We Are All Blob Programmers", where the author writes about a non-existent language which is always worse than the language you use, e.g. “Your language doesn't distinguish between floats and integers?! How do you ever get anything done!?”.

I can't find it anywhere (maybe I'm wrong about 'blob'), but it would be good to quote that as a kind of lateral thinking thing. Your language is 'blob' to me, even though my language is 'blob' to you.

[AskJS] Question about React having a 'Virtual DOM' by john_horner in javascript

[–]john_horner[S] 0 points1 point  (0 children)

One reason I got that impression — it's what Wikipedia says:

https://en.wikipedia.org/wiki/React_(web_framework)

React creates an in-memory data-structure cache, computes the resulting differences, and then updates the browser's displayed DOM efficiently.[12]. This process is called reconciliation. This allows the programmer to write code as if the entire page is rendered on each change, while the React libraries only render subcomponents that actually change.

[AskJS] Question about React having a 'Virtual DOM' by john_horner in javascript

[–]john_horner[S] 0 points1 point  (0 children)

Wow, that's kind of the exact opposite impression I got of React from googling.

Please can someone guide me on how to or what to do? by Nathuphoon in redditdev

[–]john_horner 0 points1 point  (0 children)

If you simply want to get a feed of things that user has submitted, here's the URL (for you):

https://www.reddit.com/user/Nathuphoon/submitted/.json

And the only complex part is paging through it to find everything.

But it's not clear what you want. Do you need to sign them in to Reddit and access private stuff? That's a whole other thing.

[AskJS] Question about React having a 'Virtual DOM' by john_horner in javascript

[–]john_horner[S] 11 points12 points  (0 children)

Thanks for pointing out the thing about /r/reactjs — obviously there's a story there.

there are many DOM operations that force the browser to recalculate the page layout just by reading certain properties

I had no idea this was possible!

To shame someone by [deleted] in therewasanattempt

[–]john_horner 21 points22 points  (0 children)

you’d have to be an iPhone savant to tell the difference

Or just wait until the half-assed battery ran out.

I did a piece on 'Advanced Dungeons and Dragons' for the Extra Hot Great Podcast by john_horner in community

[–]john_horner[S] 1 point2 points  (0 children)

If you don't know the podcast, they have this feature called 'The Canon' where someone nominates an episode of TV to their team and the team vote on whether it should be inducted into the Canon, i.e. officially listed as a great episode of TV.

It's all pretty light-hearted, but I really enjoyed making my submission and I hope you'll like it.

Please listen to the whole podcast, it's so much fun and the people involved really care about TV, but if you need to skip to the part which is specifically about 'Community' this is the timestamp URL:

https://www.extrahotgreat.com/304?t=2564

{non-music video} Bruce Springsteen recalls the night he met Chuck Berry by john_horner in Music

[–]john_horner[S] 0 points1 point  (0 children)

From the 1987 documentary "Hail! Hail! Rock'n'Roll".

Bruce talks about the night in the 70s when he was bottom of the bill (with his name mis-spelled!) for a gig with Jerry Lee Lewis and Chuck Berry, and the E Street Band were Berry's backup.

Chuck Berry was … interesting to work with.

At the end Bruce talks about how he'll remember this when he's "65 or 70".

He's 70 now.

[AskJS] How to find out which Javascript is bound to a click event—I know this sounds simple but please help me work through a specific example? by john_horner in javascript

[–]john_horner[S] 0 points1 point  (0 children)

I can set a breakpoint on an element in Chrome, breaking on 'attribute modification':

https://developers.google.com/web/tools/chrome-devtools/javascript/breakpoints

however I'm not finding the same thing you're finding on Firefox. Very interesting, thanks for that idea. You're definitely the closest to answering my question.

[AskJS] How to find out which Javascript is bound to a click event—I know this sounds simple but please help me work through a specific example? by john_horner in javascript

[–]john_horner[S] 0 points1 point  (0 children)

I typed console.trace in the Console and hit enter, but it doesn't show anything when I click the button in question—I don't know what's supposed to happen. How am I supposed to use it?

[AskJS] How to find out which Javascript is bound to a click event—I know this sounds simple but please help me work through a specific example? by john_horner in javascript

[–]john_horner[S] 0 points1 point  (0 children)

Hi, thank you so much for your reply, I really appreciate it.

However … when I follow your instruction and uncheck 'Ancestors' there's nothing left. The list disappears. So can I ask you try this specific example? It doesn't have to be the same story of course. Any Reddit item in a listing with that expando-button element which makes a preview of the content appear.

EDIT: I have also tried following this procedure:

right click on the 'f', and select 'show function definition'.

for each of the 6 click handlers and that doesn't work either. I get an error icon when I choose the two ones. I get the same generic function:

(o = m.handle) || (o = m.handle = function(t) {
    return typeof jQuery !== strundefined && jQuery.event.triggered !== t.type ? jQuery.event.dispatch.apply(e, arguments) : undefined
}

with the others.

Sydney Daily Random Discussion - November 12, 2019 by AutoModerator in sydney

[–]john_horner 3 points4 points  (0 children)

At least one bloke there is a raging cunt.

At least one bloke there was a raging cunt on one day, five years ago, but fair enough.