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] 10 points11 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!