The Self-Taught Programmer: The Definitive Guide to Programming Professionally
Rate it:
Open Preview
55%
Flag icon
Mary Rose Cook cuts through it with her definition, "Functional code is characterized by one thing: the absence of side effects. It doesn't rely on data outside the current function, and it doesn't change data that exists outside the current function."6
55%
Flag icon
A disadvantage of functional programming is certain problems are easier to conceptualize with state. For example, it is simpler to conceptualize designing a user interface with global state than a user interface without global state. If you want to write a program with a button that toggles a picture between being shown to the user and being invisible, it is easier to think about how to create such a button by writing a program with global state. You could create a global variable that is either True or False that hides or reveals the picture, depending on its current value. It is harder to ...more
59%
Flag icon
Object-oriented programming has several advantages. It encourages code reuse, and thus decreases the amount of time spent developing and maintaining code. It also encourages breaking problems up into multiple pieces, which results in code that is easy to maintain. A disadvantage of object-oriented programming is that creating programs takes extra effort because a great deal of planning is often involved in designing them.
59%
Flag icon
There are four main concepts in object-oriented programming: encapsulation, abstraction, polymorphism, and inheritance. Together, they form the four pillars of object-oriented programming. All four concepts must be present in a programming language for it to be considered a fully object-oriented programming language, like Python, Java, and Ruby. In this chapter, you will learn about each of the four pillars of object-oriented programming.
98%
Flag icon
Many of these principles originated in The Pragmatic Programmer by Andy Hunt and Dave Thomas, a book that dramatically improved the quality of my code.