Binary Tree – Heap

I read an article or two from Medium every day. A few days ago I read “Binary Trees: The Heap” by David Pynes. The idea behind a binary tree or heap is to be able to associate values with associated priorities. For example, assume you are in line at an emergency room in a hospital. When you arrive and register the facility may use a plain queue (FIFO) to wait for a physician. What happens if a patient in worse condition that you arrives later. The logical thing would be to allow them to see a physician before patients that are less ill. Continue reading “Binary Tree – Heap”

C++ Tidbits – Polymorphism

Good morning. It is a relatively cold Saturday in the Twin Cities. For some reason, this winter season has been warmer than usual with very little snow coverage. For example, today the high temperature will be around the freezing point. Some people (like me) like it while others hate it. There is no way to please everyone at once.

In an attempt to review in a systematic way some features of C++ I will be experimenting with polymorphism. In programming languages and type theory, polymorphism is the provision of a single interface to entities of different types or the use of a single symbol to represent multiple different types. To read more about it you may refer here.

Continue reading “C++ Tidbits – Polymorphism”

C++ Tidbits – Inheritance

I am about to complete a course on Neural Networks and Deep Learning. I am amazed at how one gets absorbed into the subject and language (in this case Python). Lately when I am working with C, C++, Java or Python I occasionally use a syntax from a different language.

In this post I will be covering / reviewing Inheritance using C++. Many years ago when I wanted to review C I would pull from my bookshelf the book “C Programming Language” by Brian Kernighan and Dennis Ritchie. During the years I have owned several copies. A few minutes ago I tried to locate my latest copy, but it seems that it grew legs and walked away. For C++ I have … (I guess I have also misplaced it) a book by Bjarne Stroustrup. Given the fact that I want a quick refresher, decided to go over an Advanced C++ Programming course by Mike McMillan. For this post (and a few more that I will write in the next few days) I am using this course as a guide and will be coding C++ on Visual Studio 2017 from Microsoft. Continue reading “C++ Tidbits – Inheritance”

Sub Strings

The end of year 2018 holiday season has come to a conclusion. This past year it seemed to be quite long. Probably because of the day in which Christmas and New Year landed. One way or the other, on Monday January 07, 2019 most people will be at work or at school.

As usual I spend some time every week taking a coding challenge. In my opinion they do little to determine if a person is capable of working as a software developer, group lead or system architect. Being able to come up with a good approach to solve a problem in an hour or so using tools you are not familiar with does not seem to be a logical approach to determine fitness for a company. The reason these challenges have become popular is due to the fact that they are encapsulated. You get a challenge, you complete it in the allotted time, and you should be able to solve any other problem. We humans are quite complex. Having excelled in school, sports, worked for a few companies and having owned my own, and studying every day for a couple hours, gives me a good insight on how and what needs to be done to achieve success in the software life cycle. Continue reading “Sub Strings”

Distance Between Nodes in a BST

I was looking at several articles on binary trees and thought it would be a good opportunity to write some Java code in order to refresh knowledge of binary trees, in particular with BSTs (Binary Search Trees). You never know what new things are out there.

I am not sure if most system architects and software developers run into the same situation as I do. I have learned and worked with many data structures and programming languages. I do not work with every single data structure often enough that I recall how to implement or use it as far as all the associated methods and functions. I have a reasonable understanding of most data structures and I can get back on the horse rather quickly. Continue reading “Distance Between Nodes in a BST”

Numpy Vectorization

As you may already know, I have been taking several AI / ML related courses. I am a firm believer in always keep on learning. Some time ago I read a report about people in the USA reading books. The statistic that called my attention was:  42% of college graduates never read another book after college. That seems to me quite disturbing. Another statistic is:  57% of new books are not read to completion. To this indicates that a) readers are not committed to learning and / or books are getting worse. Continue reading “Numpy Vectorization”

Partial Retrieve from Encrypted Store

In a previous post we covered the retrieval of data from a store. It was described that the data at rest and in transit were not encrypted. The reason was that the store was deployed in facilities behind the firewall. Access from the outside was not allowed.

As time changed, data was only encrypted in transit using secure sockets or HTTPS. Given that facilities had to allow remote access, it made sense to encrypt the data at rest. When a client application would request data, the storage server would decrypt the file and send it to the requesting client via a secure protocol. Continue reading “Partial Retrieve from Encrypted Store”

Smart Delay with Fibonacci

In the past few weeks I have been cleaning and optimizing some operations in a storage server. After running millions of operations I noticed an interesting condition and decided to use a different approach. Did a quick Internet search using Google Chrome for “smart delays” and nothing related seemed to come up. I thought using it for a title for this post would be fine. Continue reading “Smart Delay with Fibonacci”

ACM and Coursera

It is getting late in the day for me. I am a believer in deep work so several months ago I decided to get up early morning and study for a couple hours. So far, it has worked very well for me. I have set a wakeup alarm for 05:00 AM 7-days a week. Typically I am awake between 04:30 and 05:00 so I just turn off the alarm and head down to my home office. Around 05:00 PM I feel the work day coming to an end and am ready to punt. I use EyeDefender to break every two hours. During my 5 to 10 minute breaks I walk and get some fresh water. What can I say; it works for me. On weekends I tend to just do two are three blocks. On work days I tend to do five. Continue reading “ACM and Coursera”

Encrypted Store

This post has to do with encrypting data in a storage server. When the storage server in question was architected and implemented the data at rest and in transit were raw (unencrypted). The main reason was that clients and servers where deployed in the same facility.

Years when by and the requirements called for encrypting data in transit while the data at rest was left raw. Encrypting data in transit could be performed by using HTTPS, secure sockets or encrypting the data when retrieved from the servers and decrypting by clients when received. Storing data would be the opposite. The initial decision, given that the client and server where under control, was to encrypt transmissions using the Advanced Encryption Standard (AES) which was designed by Vincent Rijmen and Joan Daemen back in 1998. Continue reading “Encrypted Store”