The SteadBlog

A mixture of Computer Science and Software engineering related writings, study notes, book reviews and general ramblings. Opinions are my own - enjoy!

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction. Exercise 25 A data feed from a vendor gives you an array of tuples representing key-value pairs. The key of DepositAccount will hold a string of the account number in the corresponding value: [ ... {:DepositAccount, "564-904-143-00"} ... ] It worked perfectly in test on the 4-core developer laptops and on the 12-core build machine, but on the production servers running in containers, you keep getting the wrong account numbers.

Read more…

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction. Exercise 24 Would a blackboard-style system be appropriate for the following applications? Why, or why not? Image processing. You’d like to have a number of parallel processes grab chunks of an image, process them, and put the completed chunk back. Group calendaring. You’ve got people scattered across the globe, in different time zones, and speaking different languages, trying to schedule a meeting.

Read more…

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction. Exercise 21 Can you express the following requirements as a top-level transformation? That is, for each, identify the input and the output. Shipping and sales tax are added to an order Your application loads configuration information from a named file Someone logs in to a web application initial_order -> final_order initial_order represents the unprocessed data of an order - e.

Read more…

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction. Exercise 19 In the FSM section we mentioned that you could move the generic state machine implementation into its own class. That class would probably be initialized by passing in a table of transitions and an initial state. Try implementing the string extractor that way. The generic part of the event/strings_fsm.rb example in the book is the logic to determine the appropriate state transition given an occurrence of some event .

Read more…

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction. Challenge 1 Although there are no guaranteed ways of ensuring that you always free resources, certain design techniques, when applied consistently, will help. In the text we discussed how establishing a semantic invariant for major data structures could direct memory deallocation decisions. Consider how Topic 23, Design by Contract, on page 104, could help refine this idea.

Read more…