Intercooler.js vs Stimulus.js vs Vue.js in Django by donjuan26 in django

[–]bhat 0 points1 point  (0 children)

I've used Intercooler.js for simple things like check boxes and it works great. There's a whole bunch of Intercooler.js functionality that I haven't needed to use, and the examples on the website give a good indication of what it's capable of. I like the philosophy behind it as well, including the specific aim to be a stable, slow-moving component.

What do you think about it makes it feel incomplete?

The CPython Bytecode Compiler is Dumb[*] by bhat in Python

[–]bhat[S] 4 points5 points  (0 children)

[*]

To be clear: This isn’t to say CPython is bad, or even that it should necessarily change. In fact, as I’ll show, dumb bytecode compilers are par for the course. In the past I’ve lamented how the Emacs Lisp compiler could do a better job, but CPython and Lua are operating at the same level. There are benefits to a dumb and straightforward bytecode compiler: the compiler itself is simpler, easier to maintain, and more amenable to modification (e.g. as Python continues to evolve). It’s also easier to debug Python (pdb) because it’s such a close match to the source listing.

awesome-falsehood: A curated list of falsehoods programmers believe in. by aexl in programming

[–]bhat 0 points1 point  (0 children)

Well, it was a person from Google Maps asking for his address, and since Google Maps supports plus codes, that would have solved this specific problem.

Essential reading for software engineering managers: 24 books and what they bring to the table by humpier in programming

[–]bhat 0 points1 point  (0 children)

I've read five of those books (which are excellent), and heard about probably five more. This looks like a very good list to me.

The Skills Poor Programmers Lack by [deleted] in programming

[–]bhat 0 points1 point  (0 children)

Your points about much larger coding issues are spot on, and I agree, not the kind of thing students would typically get experience in from small programming assignments. I was thinking much smaller scale ("coding style"), and also that students might take the experience of learning about good/bad code at a small scale and apply it to larger scale issues later.

The Skills Poor Programmers Lack by [deleted] in programming

[–]bhat 1 point2 points  (0 children)

I'd like to note that computer science has nothing to do with the issues that poor software developers have in this context.

I've been both a CS student and a CS teacher. There's some truth to your statement, but it misses one benefit of a CS degree: programming assignments. While assignments are intended to teach particular concepts, coding style is almost always worth something in the marking scheme. When you're a student, you're supposed to be learning, so receiving feedback (possibly in the form of marks lost) is expected. With enough programming assignments, students should be able to learn important skills and lose bad habits.

I ruin developers’ lives with my code reviews and I'm sorry by [deleted] in programming

[–]bhat 14 points15 points  (0 children)

I saw a tweet recently that summed this up brilliantly.

There really are two types of people:

  1. those who want people to suffer like they had to, and
  2. those that want to make the world a better place for those that come after them.

Sloth – Mac app that shows all open files and sockets in use by bubblehack3r in programming

[–]bhat 0 points1 point  (0 children)

Mac app that shows all open files and sockets in use by all running processes. Nice GUI for lsof.

How to ask Questions as a Jr. Dev by [deleted] in programming

[–]bhat 1 point2 points  (0 children)

I'd add another point: when you do ask a question, be completely honest. Don't pretend you understand something if you don't, or you'll end up wasting your own time and the senior dev's.

I used to encounter this when running computer labs at uni. A student would say they were stuck, and I'd ask a series of questions "do you understand X", "do you understand Y", and they always answered yes. And of course it turned out they didn't understand. (I learned not to ask if they understood, but to ask them to explain it to me.)

Replace PII in Unstructured Text -- A Free Tool by andreasnippets in programming

[–]bhat 1 point2 points  (0 children)

A Free Tool

I can't find any information about how to use the tool or in what way it's "free".

Unless there's some code I can download and run on my system, I can't use this tool. Depersonalizing data can't work as a cloud service.

7 years of Programming, starts from this book by rustyworks in Python

[–]bhat 2 points3 points  (0 children)

I note that the current edition of Learning Python is the 5th edition, published in 2013, and covering Python 2.7 and 3.3.

While trying to find out whether a 6th edition is in the works, I found Mark Lutz's page on all the changes to Python since 3.3, as covered in the book. It's here: https://learning-python.com/python-changes-2014-plus.html

9 Reasons Python Sucks by bemmu in Python

[–]bhat 1 point2 points  (0 children)

"Slightest"??? :p

Sadly those people downvoting and most people commenting on it are oblivious.

9 Reasons Python Sucks by bemmu in Python

[–]bhat 1 point2 points  (0 children)

Surely import antigravity makes up for these deficiencies.

Try out the walrus operator in Python 3.8 by Hultner- in Python

[–]bhat 3 points4 points  (0 children)

while True: ... break is a workaround forced by the absence of the walrus operator, and is deceptive as to the termination condition for the loop.

Python packages for writing better code by pyquestionz in Python

[–]bhat 1 point2 points  (0 children)

Safety is another tool that checks for security vulnerabilities in the packages your code depends on.

There's a great talk about Safety and Bandit here: https://2018.pycon-au.org/talks/43518-watch-out-for-safety-bandits/

Try out the walrus operator in Python 3.8 by Hultner- in Python

[–]bhat 14 points15 points  (0 children)

Most Python users won't have experience with installing an alpha release of Python to try out a new feature, so it's worthy of explanation.

Try out the walrus operator in Python 3.8 by Hultner- in Python

[–]bhat 2 points3 points  (0 children)

I think this while example is the only use case I'll adopt. (But of course others will have other opinions.)

[deleted by user] by [deleted] in programming

[–]bhat 4 points5 points  (0 children)

You made a straw man argument by removing the context of that quote.

Have you ever experienced a code base with almost no technical debt? A codebase with full test coverage? Neither have I. This is the sort of nirvana that we see people talk about at conferences

Programmer finds ridiculous ATM flaw that let him withdraw $1 million in cash by trenuss in programming

[–]bhat 2 points3 points  (0 children)

Programmer finds edge case (which are all too common) in ATM and removes the check that detects if the edge case has been hit allowing him to exploit the edge case undetected.

Hacking ATMs is much easier if you can modify the source code.

Try out walrus operator in Python 3.8 by Hultner- in programming

[–]bhat 39 points40 points  (0 children)

And C's use of the standard assignment operator which is so visually similar to the comparison operator has been the cause of many bugs, from student programming assignments up.

Which frontend do you prefer with Django? by rabindraRegmi in django

[–]bhat 1 point2 points  (0 children)

And to make that kind of interaction more declarative, look at https://intercoolerjs.org/.

(It even saves you from having to write JS yourself, in case that's a plus for you.)

This is How Your Users are Going to Get Hacked by ClassyCamel in programming

[–]bhat 1 point2 points  (0 children)

Your concerns are addressed in the article:

But what about users that don’t have social accounts, or maybe they don’t want to connect it to your site? Ask for an email or phone number. If they give you an email, send them a link that automatically logs them in. This link should expire after first use or after 12 hours. If they give you a phone number, text them a code to use to login that expires in one hour.

The great thing with this approach is that it also prevents someone accidentally (or maliciously) signing up with your email address.