Skip to content

PacktPublishing/Hands-on-Design-Patterns-and-Best-Practices-with-Julia

Repository files navigation

Hands-On Design Patterns and Best Practices with Julia

Hands-On Design Patterns and Best Practices with Julia

This is the code repository for Hands-On Design Patterns and Best Practices with Julia , published by Packt.

Proven solutions to common problems in software design for Julia 1.x

What is this book about?

Design patterns are fundamental techniques for developing reusable and maintainable code. They provide a set of proven solutions that allow developers to solve problems in software development quickly. This book will demonstrate how to leverage design patterns with real-world applications.

This book covers the following exciting features:

  • Master the Julia language features that are key to developing large-scale software applications
  • Discover design patterns to improve overall application architecture and design
  • Develop reusable programs that are modular, extendable, performant, and easy to maintain
  • Weigh up the pros and cons of using different design patterns for use cases
  • Explore methods for transitioning from object-oriented programming to using equivalent or more advanced Julia techniques

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

abstract type Formatter end
struct IntegerFormatter <: Formatter end
struct FloatFormatter <: Formatter end

Following is what you need for this book: This book is for beginner to intermediate-level Julia programmers who want to enhance their skills in designing and developing large-scale applications.

With the following software and hardware list you can run all code files present in the book (Chapter 1-12).

Software and Hardware List

Chapter Software required OS required
1-12 Julia Version 1.3.0 or above Windows, Mac OS X, and Linux (Any)

Code in Action

Click on the following link to see the Code in Action:

YouTube

Errata

Page numbers below refer to the printed version. E-copy page numbers are slightly different.

  • Page 39 and 49: Before running the using Calculator command, he/she can first go to the Pkg mode (by pressing the ] key) and then run the dev Calculator command. For example:
       (@v1.4) pkg> dev Calculator

       Path `/Users/tomkwong/.julia/dev/Calculator` exists and looks like the correct package. Using existing path.

         Resolving package versions...

          Updating `~/.julia/environments/v1.4/Project.toml`

         [17fd2872] + Calculator v0.1.0 [`~/.julia/dev/Calculator`]

          Updating `~/.julia/environments/v1.4/Manifest.toml`

         [17fd2872] + Calculator v0.1.0 [`~/.julia/dev/Calculator`]
  • Page 54: The subtypetree function does not work when there is cycle in the type hierarchy. It is generally not a problem with the exception that the Any type is a subtype of itself. So, running subtypetree(Any) would get into an infinite loop. Please see Chapter02/subtypetree2.jl for a more robust version.

  • Page 110: The signature of the first explode function under Using type parameters section should take <: Any rather than just Any.

function explode(things::AbstractVector{<:Any})

Because every type is a subtype of Any, it is more idiomatic to omit the parametric part and use with a simpler syntax:

function explode(things::AbstractVector)
  • Page 219: The vendor_id of the TripPayment has the wrong type. It should be Int rather than String.

  • Page 249: The second image on page number 249 is incorrect. The correct image is as follows:

  • Page 318, 352, 494: These pages contain typos where "accessor" was misspelled as "assessor".

Related products

Get to Know the Author

Tom Kwong , CFA, is an experienced software engineer with over 25 years of industry programming experience. He has spent the majority of his career in the financial services industry. His expertise includes software architecture, design, and the development of trading/risk systems. Since 2017, he has uncovered the Julia language and has worked on several open source packages, including SASLib.jl. He currently works at Western Asset Management Company, a prestige asset management company that specializes in fixed income investment services. He holds an MS degree in computer science from the University of California, Santa Barbara (from 1993), and he holds the Chartered Financial Analyst® designation since 2009.

Other books by the authors

Suggestions and Feedback

Click here if you have any feedback or suggestions.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781838648817

About

Hands-On Design Patterns with Julia, published by Packt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published