Data Oriented Programming – DOP

A couple weeks ago I attended the one-hour webinar “Reduce System Complexity with Data-Oriented Programming” from the ACM. I have been a member of the ACM for a long time and enjoy their webinars, magazine, and access to on-line courses. At this time they offer access to PluralSight which happens to also be offered at work.

The following comes from the invitation to the ACM webinar:

Description

Complexity is one of the main difficulties in the development of successful software systems. Modern programming languages and frameworks make it easy to develop and deploy our code quickly, but as the code base grows, complexity makes it challenging to add new features. Continue reading “Data Oriented Programming – DOP”

Best Time to Buy and Sell Stock with Transaction Fee

Good morning! Hope you had a great weekend. The weekend was not too exiting for my wife and me. We did replenish our freezers for the next few months. I believe we have enough supplies to last us through a good part of spring 2022.

We decided to cook some ribs in the oven. We have done this several times, but due to the fact that my wife is not too fond of such delicacy we have not cooked them in about three years. I pulled the ribs from one of the freezers and put it in a refrigerator for three days. On Friday evening I took them out of the fridge and they were still partly frozen.

On Saturday morning after breakfast I rubbed some salt and pepper on the ribs. Like I mentioned, she is not too fond of ribs or BBQ sauce. I wanted to add some that we got at Trader Joe’s a couple weeks ago. I ended using the sauce on my dish. My wife used an Asian sauce which went very well with ribs. We also bought that sauce at Trader Joe’s.

I was going to set the oven at no more than 300F, but my wife suggested 325F to get them done faster. The ribs went in around 07:00 AM. After showering and getting dressed, I went down to my office for a 2-hour block.

Later that morning my wife and I sat down for a cup of triple espresso. We chatted and decided to get a couple items at a specialty grocery store in St. Paul. We turned off the oven and headed out. In retrospect, we should have removed the ribs from the oven. We had lunch around 01:00 PM and the ribs got a little dry for my taste. We had them with brown rice and black beans. We both enjoyed them, but once a year is enough. The taste is very unique like turkey. We have turkey on Thanksgiving Day and perhaps Christmas. I guess most people do the same in this part of the country.

On a separate note, I ran into the article Was Our Universe Created in a Laboratory? by Avi Loeb published on Scientific American on October 15, 2021. The article starts with the word “Opinion” which puts it into perspective.

I am not going to get into the implications of the ideas in the article. My parents taught me never to discuss religion, money or sex. Such subjects are very opinionated and it is hard to get a general consensus. That said; here we are talking about the article. The reason for me to bring it up is due to the fact that for the past three decades or more, when my wife and I talk in private, I have described to her the idea of multiple universes generated by beings more advanced than us. In such universes there are some actual beings and many artifacts. The idea behind is to study scenarios that in general fall outside our comprehension and interests.

I have to tell you that as soon as I read the article, I ran to my wife to tell her about it. We both thought it was very interesting.

In my thoughts and opinion, the article does not exclude a superior being that is above all levels. It just puts such being above the more advanced civilization(s) that at this point are able to generate universes.

I will try to contact the author of the article and let him know that I really enjoyed reading it. After an hour or so of sending my message to the author, I received a reply. Thanks. Continue reading “Best Time to Buy and Sell Stock with Transaction Fee”

Database Sharding

Good day software developers and engineers. Today is Wednesday and it seems it is going to be a sunny day in the Twin Cities of Minneapolis and St. Paul. Hope the weather cooperates in your neck of the woods.

I continue to read and experiment with the contents presented in the on-line course Introduction to Python Fundamentals: Lesson 02 by Paul Deitel published by Pearson Education, Inc. As a matter of fact, tomorrow I will start with lesson 03. So far I am pleased to be reviewing and learning new things during the process. Continue reading “Database Sharding”

Introduction to Python Fundamentals – Lesson 1

It is Thursday morning in the Twin Cities of Minneapolis and St. Paul. Even though we are still officially in summer, the highs and lows for the days are going down. Hopefully we will have at least two more months of decent weather to walk outside.

As I mentioned in the last posts, we are going to start solving problems in Python. According to the PYPL Index, for results collected in August 2021, the most popular programming language is Python with a share of 31.47%. Java is second with a 19.14% share.

According to the IEEE Spectrum article “Top Programming Languages 2021 Python dominates as the de facto platform for new technologies” Python is number 1. I guess it is time to start solving problems in Python. In our next post I will start solving easy problems. We will then progress to medium and hard.

As you might already know, I like to refresh on tools I will be using. I decided to start watching “Introduction to Python Fundamentals: Lesson 01” by Paul Deitel published by Pearson Education, Inc. Since I am a member of the ACM (https://en.wikipedia.org/wiki/Association_for_Computing_Machinery) I have access to O’Reilly titles. If you work developing software, I strongly recommend you joining the ACM. They provide a wealth of information at your fingertips. For example, earlier today I attended the webinar “Quantum Computational Supremacy” by Scott Aaronson. I do not work with quantum computers, but enjoy learning about the technology. If you have a chance, watch the recording of the webinar which should be available in a few days.

Continue reading “Introduction to Python Fundamentals – Lesson 1”

Visual Studio Code Install on Linux

Finally summer 2020 has arrived. Today’s high is in the lower to mid 70s. Currently the sky is overcast. My wife and I prefer it sunny but the temperature is fine with me. My wife prefers hot and humid weather. Not everyone likes chocolate. We will probably keep the windows open all day. Living in Minnesota with long and cold winters, fresh air is always welcomed.

Yesterday we spoke over Jitsi with a couple of friends we both know since our teens. We have traveled abroad on several occasions with and without family. We were going to chat last Sunday (Father’s Day) but due to our schedules we postponed it until Monday. We found out that both have been diagnosed with COVID-19 and are being treated as we speak. Their daughter, who lives with them, has not contracted the virus yet. They both looked tired so we limited our call to 20 minutes. Typically we go for a couple hours. Hopefully all will go well and they will have a short recovery! Continue reading “Visual Studio Code Install on Linux”

Using with in Python

It is Wednesday in the Twin Cities of Minneapolis and St. Paul. My wife and I spent most of the morning dealing with health insurance. Hopefully all will be done in the next few days. I am in the process of changing health insurance companies. Due to the COVID-19 pandemic everyone is using some type of video application to communicate. The proposed application was Zoom, but due to the security issues, we prefer using Jitsi. It did not take more than a minute to switch applications. It is interesting that video on Jitsi was working great but one of the participants decided to use our cell phones for voice because he did not have a camera or microphone on his computer. The cellular signals were not that great, but we managed. Continue reading “Using with in Python”

Working with Files – Python

A couple weeks ago one of my wife’s nice told her that there is a Costco store in Minneapolis that seems to sell different items and in larger packages than others. The Costco Minneapolis Business Center Warehouse is located at 3311 Broadway St NE, Minneapolis, MN 55413-4553. We have not visited the store yet.

A couple days ago there was an article by CBS News titled Groceries could see meat shortages by end of week amid plant closings. I read it and twitted it. In addition I sent a message with the link to my two sons. Apparently they both decided to resupply on meats yesterday. One of my sons lives in Madison, WI so he just went to the Costco store near him. The other lives in MN. The one in WI periodically orders a side of beef and a side of pork. I believe he should be fine for a while.

My son who lives in MN decided to visit the Costco store on Broadway Street. He was impressed by the size of the packages of meat. The prices were very appealing. The only drawback for some might be that you need to buy a large and uncut piece (e.g., full rib eye) and when you get home you need to cut in servings, put them in plastic bags, and then store them in a freezer. If you do not do so and just put it in a freezer, you will have to consume it all in a few days after thawing it. You should never refreeze meats. My sons and we at home are used to this process. We get most of our protein at restaurant suppliers. Continue reading “Working with Files – Python”

DynamoDB

I do not like to live of past memories but this morning I spent a few minutes updating the About me … section in this blog. I included the fact that since my early 20’s I started dabbling with starting my own businesses. At the time I got together with a couple friends and opened a liquor store. I was able to secure beer distribution of one of the largest breweries in Peru. The rules are that breweries sell only via distributors and distributors only sell to liquor stores. About a year after, I sold the business due to the fact that I received a scholarship to attend Cornell University and permanently move to the USA.

Continue reading “DynamoDB”

Logistic Regression with a Neural Network mindset

It is a very snowy day in the Twin Cities of Minneapolis and St. Paul. Schools are closed due to the amount of snow and low visibility. It started snowing earlier this morning and according to forecast, it should end around 09:00 PM this evening. We have already surpassed the snow amount for February according to records that go back over a century. We will be receiving more snow in the upcoming days. Will see if we set other new records.

In this post I will cover a logistic regression implementation used to determine if pictures contain a cat or not. The code is based on an edited assignment for Coursera Neural Networks and Deep Learning. Continue reading “Logistic Regression with a Neural Network mindset”

Broadcasting in Numpy

Broadcasting is a feature of Python and Numpy. When one is performing array operations, in some cases the shapes of the arguments do not match. The good and bad thing is that Python assumes what you want to happen and does it. In most cases the results are fine, but on occasions Python might do something that you are not expecting. This post discusses to some degree what is broadcasting. The idea is that we will be using it in a future post when doing some regressions for image recognition. Continue reading “Broadcasting in Numpy”