December is here, and with it a ton of coding advent calendars. Some challenging, some educational, some just fun, there's certainly one for you (and very likely in a language you prefer). Check them out. You can start at https://adventofcode.com.

Sponsor

Hey everybody, we have updated our RedBubble store and included our new logos. You can now buy stickers for Morning Cup of Coding, Human Readable Magazine, and Human Readable.

Use this link to get a $20 off for your first order of $60 and above!

Articles

(Nov 19) #c #javascript #java

Random number generators have almost an endless list of uses, making them a must have tool in any developers toolbox. But how do you go about making your own? Chris Wellons has got you covered in this article, where he demonstrates a simple algorithm and a set of rules that can guide you on making your very own pseudo random number generator in any language. He does three implementations in C, JavaScript, and Java.

(Nov 18) #angularjs

In web development, you'll often have to validate user input to make sure it matches a certain criterion. Sometimes it'll be necessary to check this information on the backend, which involves sending the input from front to back and pausing process flow until a response is received. Rick Strahl has aggregated all the information you need on writing async validators in Angularjs to achieve this goal, starting from writing a simple yes/no validator to a practical async example.

(Nov 15) #c #haskell

Algebraic data types are a big part of any functional programming language (universally known as algebraic structures) and have been finding there way into some imperative programming languages. They're especially useful for ensuring type safety in your program. In his article, Alessio Chiapperini explores how sum types are implemented in C through two examples: Peano numbers and a lazy list.

(Nov 17) #rust

It's great that in this day and age there is almost an endless list of possibilities for how to structure your data. It's also a little annoying, since often times data has to be rearranged based on what language, protocols, or frameworks you're using. This is exactly what the Rust library Serde is for. In Josh Mcguigan's article, he does a thorough deep dive into one specific part of Serde: how it serializes to JSON. His approach is not only insiteful, but provides a framework anyone can adopt to understanding how a library works.

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