Notebooks are an excellent way to store little python projects because they cleanly mix markdown and runnable code snippet in one file. If you are using python or doing data science work, building your project inside of a notebook can make it easily transferable to other colleagues in a presentable form right out of the box.
0 Comments
If you know me well then you probably know how in love I am with serverless backends, cloud functions, lambdas, and whatever other fancy names they can give for basically a pay-only-for-what-you-use server. I'm also pretty fond of the Serverless Framework (https://github.com/serverless/serverless) which let's you easily scaffold out a new project meant to be run on a serverless architecture. Although I've only been using it for AWS Lambda, I recently made a little mistake that turned out to be a great discovery, and in this post I'll tell you all about it!
This tip works for many languages, and it’s not explicitly stated all the time when starting out. I had already known that you could do this, but kudos to the book “Javascript & JQuery” by Jon Duckett for inspiring me to write a post about it. It’s a very colorful and friendly book that is actually read fun to read which is a huge accomplishment for a book about programming. Anyway, this is a useful little tip to remember when crafting your functions.
Let’s think about the function signature in different (statically typed) languages. Remember, the compile breaks out of the function when return method is called, and nothing after it is run. The function defines a return type, and to a naive programmer looking at the signature it seems that one can only return a single thing. And it’s true- you can only return one thing. But, that thing can be an Object or an Array. |
AuthorThe posts on this site are written and maintained by Jim Lynch. About Jim...
Categories
All
Archives
March 2023
|