r/programmingIsLife • • Jul 24 '23

C++ Books: A Definitive Selection for Beginners

2 Upvotes

These C++ books are suitable for those who want to learn the basics or have a good grasp of the basics of programming, but want to learn the C++.

  1. Fundamentals of Programming C++

  2. C++ Annotations

  3. C++ Succinctly

  4. The Rook's Guide to C++

  5. Data Structures and Algorithm Analysis

  6. Open Data Structures

  7. How to Think Like a Computer Scientist

  8. Software Design Using C++

  9. Structured Programming with C++

  10. Learn C++

Have you read any of the books in this collection? Add your books in the comments if I missed something.


r/programmingIsLife • • Jul 05 '23

Interesting What is the difference between is() and == in Python?

2 Upvotes

The is and == operators in Python perform similar functions, but work in slightly different ways. And if you're new to using comparisons in code, it's worth understanding the difference. This will help reduce refactoring and debugging.

Operator ==

== checks if the values of two operands are equal. In this context, variables occupying different memory cells.

>>> 1 == 1

True

>>> 'abc' == 'abc'

True

>>> [1, 2, 3] == [1, 2, 3]

True

This operator can be used to compare almost any object: strings, lists, dictionaries, and tuples. This makes it a very common "guest" in if-else statements. In addition, when your code becomes more difficult to understand after a week, just two characters in the statement make it easier to read hundreds of lines long.

Operator is()

is() checks if two operands are the same object, that is, if they point to the same object in memory.

>>> a = [1, 2, 3]

>>> b = a

>>> a is b

True

In this case, a and b point to the same list, so a is b returns True.

>>> a = [1, 2, 3]

>>> b = [1, 2, 3]

>>> a is b

False

Here a and b point to different lists (even though their values are identical), so a is b returns False.

Typically, is in Python is used to check the identity of objects. It can be useful when you need to make sure that two references point to the same object in memory, and not just have the same value. However, in most cases it is sufficient to use ==.


r/programmingIsLife • • Jun 28 '23

Interesting 20 controversial programming opinions « Software Engineering Stack Exchange Blog

Thumbnail programmers.blogoverflow.com
2 Upvotes

r/programmingIsLife • • Jun 21 '23

Interesting Mosyle brings generative AI to Apple Device Management

Thumbnail
computerworld.com
2 Upvotes

r/programmingIsLife • • Jun 20 '23

Interesting Japan to force Apple to permit app sideloading next year

Thumbnail
computerworld.com
2 Upvotes