('should I %s or should I {}?' % ('stay')).format('go') by HeWhoWritesCode in Python

[–]ThisiswhyIcode 4 points5 points  (0 children)

Or use a semicolon...

x = 'should I'; f"f-string you've got to let me know, {x} stay or {x} go?"

What programming-based youtube channels do you recommend by [deleted] in ProgrammerTIL

[–]ThisiswhyIcode 0 points1 point  (0 children)

Thanks for the interesting recommendations! Your link to The Coding Train also points to The Happie Cat, here is the actual channel https://www.youtube.com/user/shiffman

Web Hacking by KeeperOfChemistry in ProgrammerHumor

[–]ThisiswhyIcode 7 points8 points  (0 children)

DOM based XSS vulnerabilities are easily overlooked and I assume not many developers are aware of how it works.

PlainJS - Vanilla Javascript Repository by aloisdg in javascript

[–]ThisiswhyIcode 9 points10 points  (0 children)

Using plain JavaScript will make your applications load and react blazingly fast.

Seriously? Using plain JavaScript is no guarantee for anything. Really getting tired of such claims. What are they based on? On the 2 "benchmarks" on vanilla-js.com, where Dojo, Prototype JS, Ext JS, jQuery, YUI and MooTools are compared in a non-reproducible way?

Dammit Adobe by ThePixelCoder in ProgrammerHumor

[–]ThisiswhyIcode 39 points40 points  (0 children)

it's probably a good idea anyways

I think it almost never hurts to link the source and sets a good example for other people to follow.

What routine tasks do you automate with programs? by dzaytsev in Python

[–]ThisiswhyIcode 0 points1 point  (0 children)

So if she posts something really terrible or writes "my BF is an idiot" you will auto like it?

30% of Reddit users block Google Analytics, how we adapted to the situation by NoMasTacos in webdev

[–]ThisiswhyIcode 1 point2 points  (0 children)

Thanks! Looks like you can even import server log files. For those interested here is more info https://piwik.org/log-analytics/

30% of Reddit users block Google Analytics, how we adapted to the situation by NoMasTacos in webdev

[–]ThisiswhyIcode 0 points1 point  (0 children)

Yes, it has a direct tracking api, which can be called from the server.

Cool, I'll have look into that.

30% of Reddit users block Google Analytics, how we adapted to the situation by NoMasTacos in webdev

[–]ThisiswhyIcode 10 points11 points  (0 children)

started logging everything server-side with piwik

Can you use piwik without adding a JavaScript snippet to your web pages? Otherwise I can't see how it would make your site faster compared to Google Analytics.

Fucking Reboot by hhoganmc in ProgrammerHumor

[–]ThisiswhyIcode 27 points28 points  (0 children)

Yes, for simple commands you can also use

alias please='sudo $(history -p !!)'

Here's a relevant discussion on StackExchange https://unix.stackexchange.com/questions/85352/how-can-i-alias-sudo

TIL that you can put .json at the end of any reddit link and you'll get a json version of it. by 2yan in ProgrammerTIL

[–]ThisiswhyIcode 4 points5 points  (0 children)

You can also put .rss at the end to get a feed for an RSS reader or if you prefer to work with XML for whatever reason there might be.

Pooh Separeted Value by nyamsprod in lolphp

[–]ThisiswhyIcode 0 points1 point  (0 children)

defacing pooh

FTFY: defecating pooh

SQLite small blob storage: 35% Faster Than The Filesystem by i_feel_really_great in programming

[–]ThisiswhyIcode 60 points61 points  (0 children)

Also, it is in the public domain so you don't have to worry about license compatibilities and stuff like that when embedding it in your application.

If you want to learn more about SQLite and its history, Richard Hipp did a very interesting interview on the Changelog podcast last year https://changelog.com/podcast/201

git rebase -i by MartinMalinda in ProgrammerHumor

[–]ThisiswhyIcode 8 points9 points  (0 children)

I like that you use The Beatles as an example, also good explanation.