5626463547 | San Jose, CA 95126

Docker & MySQL

How to run MySQL in a Docker container Prerequisite: You have installed Docker and it is running. Run Docker Container with Empty Database [simterm] docker run -d -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user \ -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=mydatabase mysql/mysql-server:5.7 [/simterm] Explanation: the goal of this command is to run a MySQL server version 5.7 and setup an empty database with a user and password. The MYSQL_ROOT_PASSWORD is an environment variable inside the container; it is mandatory and provides the password at the root for the superuser. The other MYSQL environment variables are optional. But as you can see, I am here created a user, a password, and an empty database called mydatabase. --name parameter provides a name to the docker container. -p 3306:3306 tells Docker to use [...]

2018-06-07T19:47:00+00:00 June 7th, 2018|Comments Off on Docker & MySQL

On Justifying the Current Practice in the Software Engineering Technical Interview

Why do software engineering interviewers care so much about data structures and algorithms?  It is a question you have probably asked yourself if you have gone on the market for a software engineering job. I have never myself heard a very convincing answer where the answer is interpreted as a justification of the practice. There are plausible sociohistorical explanations for why interviewers ask questions like, "balance this binary tree" or "implement a function that removes a node from a linked list." Such questions are arguably analogs of vestigial organs, a legacy of interview questions from the 1950s. But still they remain. And should they? Yes, says Soham Metha, the previous Director of Engineer at Box and founder of InterviewKickstart.com. Metha's answer to this question is interesting because he acknowledges: Yes, DS/Algos are [...]

2018-02-18T23:54:26+00:00 November 18th, 2017|Comments Off on On Justifying the Current Practice in the Software Engineering Technical Interview

Bubble Sort

Bubble sort, also sometimes called sinking sort, is a sorting algorithm that is sometimes used to introduce algorithms. It turns out that it is a pretty inefficient means of sorting, especially if the list is very much unsorted and contains many elements. For that reason, some textbooks now avoid teaching Bubble sort; the idea is that its impracticality undermines its pedagogical use. But I disagree. When learning other concepts, such as the meaning of "valid" in a critical reasoning or first-order propositional logic course, it is common to present valid arguments that no one would ever use for the purpose of arriving at true beliefs.  Those arguments can nevertheless be a good heuristic for grasping what validity is. It is sometimes the case that thought experiments or ideas [...]

2018-06-07T21:33:50+00:00 January 23rd, 2016|Comments Off on Bubble Sort

Binary Search

The value of binary search is that you can search for whether an item exists in a sorted list, array, etc. without having to look at possibly every single item. Suppose you have a sorted array of integers but you do not know what numbers exist in the array. What you do know is that the array is sorted from lowest to highest, there are 1000 elements in the array, and the number you are looking for is 256. A simplistic approach is to start at index 0, check if it is equivalent to 256, if not, then check the next item, and the next item, until you've checked all the items and either found or not found the item.  If 256 was the first item, you would be done on the first comparison. [...]

2018-06-07T21:33:36+00:00 January 22nd, 2016|Comments Off on Binary Search