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. Challenge 1 Points to ponder: If DBC is so powerful, why isn’t it used more widely? Is it hard to come up with the contract? Does it make you think about issues you’d rather ignore for now? Does it force you to THINK!? Clearly, this is a dangerous tool! Design by contract leads to similar arguments as the great dynamic vs static typing debate:

Read more…

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction. Exercise 11 You’re rewriting an application that used to use YAML as a configuration language. Your company has now standardized on JSON, so you have a bunch of .yaml files that need to be turned into .json. Write a script that takes a directory and converts each .yaml file into a corresponding .

Read more…

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction. Challenge 1 Design a small address book database (name, phone number, and so on) using a straightforward binary representation in your language of choice. Do this before reading the rest of this challenge. Translate that format into a plain-text format using XML or JSON. For each version, add a new, variable-length field called directions in which you might enter directions to each person’s house.

Read more…

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction. Exercise 9 You are asked “Which has a higher bandwidth: a 1Gbps net connection or a person walking between two computers with a full 1TB of storage device in their pocket?” What constraints will you put on your answer to ensure that the scope of your response is correct? (For example, you might say that the time taken to access the storage device is ignored.

Read more…

See the first post in The Pragmatic Programmer 20th Anniversary Edition series for an introduction. Challenge 1 Could some of the requirements of your current project be expressed in a domain-specific language? Would it be possible to write a compiler or translator that could generate most of the code required? Yes and it is something that my team an I would like to investigate actually implementing. The current project is a REST API and the requirements in question are user authorisation.

Read more…