Wednesday, January 23, 2019

Your Best Brain

Your Best Brain: The Science of Brain ImprovementYour Best Brain: The Science of Brain Improvement by John Medina
My rating: 5 of 5 stars

A good combination of theoretical and practical knowledge to help you understand and care for your brain.

View all my reviews

Monday, January 21, 2019

Comment Before You Finalize Your Code

Joke about commenting code.
I've often heard programmers say, "Why should I bother commenting my code now? It'll only change!" We comment code to make the software easier to debug, test, and maintain. By commenting your code while coding (or beforehand), it will be easier for you to debug the software.
    As you debug your software, you will undoubtably find flaws. If a flaw is in your conversion from the algorithm to the code, you'll need to change only the code, not the comments. If the flaw is in your algorithm, you'll need to change both the comments and code. But how would you even know you had an algorithmic error unless you had comments?


Reference:
Kernighan, B., and Plauger, P., The Elements of Programming Style, New York: McGraw-Hill, 1978.

Saturday, January 19, 2019

Historic [Software] Preservation

Building being maintained to keep it in active use and relevant.


At its most basic, historic preservation is about keeping old places alive, in active use, and relevant to the needs of communities today. In software engineering, historic preservation is called software maintenance. The only difference between them is that the word "places" is better represented by the word "systems".

At its most basic, software maintenance is about keeping old systems alive, in active use, and relevant to the needs of communities today.

Tuesday, January 15, 2019

Get It Right Before You Make It Faster

Slow and complete is better than fast and not finished.

It is far easier to adapt a working program to make it run faster than to adapt a fast program to make it work. Don't worry about optimization when doing your initial coding. On the other hand, don't use a ridiculously inefficient algorithm or set of data structures.
    Every software project has tough schedule pressures. Some may not be very pressured during their early phases, but even they step up the pace later. Given this situation, anytime a component is produced on, or ahead of, time and it works reliably, it is cause for celebration. Try to be the reason for celebration rather than desperation. If you get your program working (however slowly it runs), everybody on your team will appreciate it.


Reference:
Kernighan, B., and Plauger, P., The Elements of Programming Style, New York: McGraw-Hill, 1978.

Wednesday, January 09, 2019

The Antidote: Happiness for People Who Can't Stand Positive Thinking

The Antidote: Happiness for People Who Can't Stand Positive ThinkingThe Antidote: Happiness for People Who Can't Stand Positive Thinking by Oliver Burkeman
My rating: 4 of 5 stars

Despite the fact that the title implies that this is a self-help book, it really is not. It is more of a journalistic study of philosophies that don't focus on the positive. There are no step-by-step guides of how to change your life. It is more like following along with a friend is learning about different techniques and giving them a go.

View all my reviews

Tuesday, January 08, 2019

Use Optimal Data Structures

Data structures & algorithms are intimately interrelated. (Jerry Yoakum)

The structure of data and the structure of programs manipulating that data are intimately interrelated. If you select the right data structures, your algorithms (and thus your code) become easy to write, and easy to read, and therefore easy to maintain. Read any book on algorithms or on data structures (they're one and the same!).
    When preparing to write a program, you should develop the algorithms and data structures together. Try two or three or more different pairs before you select the best one. And be sure to encapsulate the data structure in one component so that, when you later find a better structure, you can change it easily.


Reference:
Kernighan, B., and Plauger, P., The Elements of Programming Style, New York: McGraw-Hill, 1988.

Get Javascript in WordPress

I've been working on a WordPress site for a client/friend. He wanted some custom generated content so I used Javascript. However, by default Javascript is disabled in WordPress. Thankfully GoDaddy support had the answer.

https://www.godaddy.com/garage/3-ways-to-insert-javascript-into-wordpress-pages-or-posts/

We're not using GoDaddy for hosting but they still came through with a good answer so I want to give them credit. I used method 1.

Image of text describing how to disable WordPress filtering of script tags.

In addition to giving proper credit, this post will serve as a reminder to me what was done to get Javascript working on his site. Changing the theme and possibly updating the theme will likely break this fix.

Monday, January 07, 2019

Design Is Multidimensional

Complete software design is multidimensional. (Jerry Yoakum)

When designing a home, architects represent it in many ways to fully understand and convey its essence to builders, buyers of materials, and home buyers: elevations, floor plans, framing, trusses, electrical routing, plumbing routing, concrete shape, door and window framing details, and other points of view. The same is true of software design.
    A complete software design includes at least:

  1. Packaging. Often drawn as a hierarchy chart, this captures "what is part of what?" It often implies data visibility. It also shows encapsulation, such as data and functions within objects.
  2. Needs hierarchy. This captures "who needs whom?" Drawn as a network of components, arrows indicate which components need something. The needs might be data, logic, or any other information.
  3. Invocation. This captures "who invokes whom?" Drawn as a network of components, arrows indicate which components "call," "interrupt," or "send messages to" others.
  4. Processes. Sets of components are packaged together as asynchronous processes. These are copies of components that are running simultaneously with other processes. Zero, one, or more copies may exist at one time. This should also specify conditions that cause a process to be created, executed, stopped, and destroyed.

Reference:
Witt, B., Baker, F., and Merritt, E., Software Architecture and Design, New York: Van Nostrand Reinhold, 1994.

Sunday, January 06, 2019

Scrum Bums: A Get Fuzzy Collection

Scrum Bums: A Get Fuzzy CollectionScrum Bums: A Get Fuzzy Collection by Darby Conley
My rating: 5 of 5 stars

Get Fuzzy is my go to comic to cheer me up. Scrum Bums does not disappoint.

View all my reviews