Articles

Community Highlight: Static types are dangerously interesting

Data types, if written correctly, allow the programmer, among other things, set boundaries on the code they can write that won't break the program at runtime. They are also especially useful for data with unique attributes that dictate how the data should interact with other data of its type. In this exploratory article by Alex Nixon, he discusses three implementations of a money type that can be used to transfer money with different currencies between users using Haskell.

(Jan 13) #go

Reflected binary code or Gray code is "an ordering of the binary numeral system such that two successive values differ only in one bit". In this concise article, Jordan Sitkin demonstrates the difference between counting in Gray code compared to standard binary, gives a few use cases, and provides an implementation of generating Gray code in Go.

(Jan 18) #math #python

You've probably heard of and used the cosine function before, although it might've been a while ago. Well did you know that it if you repeatedly reapply cosine to a value it'll converge to 0.73908513? In John D. Cook's short article, he implements a variation of the cosine fixed point in Python using the new walrus operator notation to assign a variable in the loop test.

(Jan 17) #math #machine learning

Understanding the uncertainty in any model is essential, since models are just a representation of what might happen rather than an exact reflection of reality. This becomes a little tricky when it comes to machine learning, since much of the machinery behind the algorithm is usually hidden away. In this extensive article by Jacob Buckman, he highlights some of the limitations of using arbitrary posterior functions for Bayesian Neural Networks, specifically when it comes to accounting for uncertainty.

(Jan 20) #cpp

Bartlomiej Filipek noticed an interesting pattern emerge while doing research and when he took a closer look he realized that there were a lot of things going on in just a few lines of the pattern. In this article, the author talks about the C++17 features the pattern takes advantage of to accomplish it goals in fewer lines as possible.

And that''s it for today! Discuss this issue at our subreddit r/morningcupofcoding.

Did you like what you read? Let us know by clicking one of the links below.

Liked - Disliked

I hope you enjoyed reading the latest issue of Morning Cup of Coding. If you did, consider supporting us by becoming a patron (Patreon) for perks like ad-free issues, or via a one-time donation via PayPal.

Interested in sponsoring our newsletter? Click here to send us an email.

Cheers,

Pek