Command pattern is a behavioral pattern in GoF as it allows us to decouple between the Invoker (a.k.a. sender, an object that invokes an operation) and the Receiver (an object that receives the request to execute a certain operation).
Also known as an action or transaction pattern.
Getting traction is hard. In the Bullseye Framework, the outer ring is what's possible, the middle ring is what's probably, the inner ring is what's working. Getting traction is finding the inner ring.
There are 19 channels you can use to gain traction. According to Law of Shitty Clickthrough, all marketing strategies eventually result in shitty clickthrough rates. However, some may works well, others not so well. It's hard to predict which channel will work the best. Therefore, do not only consider those channels you're comfortable with.
Asking your potential customers to email someone they know with your product information is an awesome marketing idea. To provide an incentive, you can promise a free gift to the one sending out the email to one of his/her friend. The friend who gets to know your product that his/her friend suggests, and the products mentioned in the email get promoted.
The all-win situation is a great way of marketing your product. Make sure your product is good enough so you won't let the sender down. Also, make sure the gift is worth the sender's effort while you minimize the work of composing the email for the sender to send out.
Use "mailto:" HTML tag to pre-compose the email, set the b.c.c. to yourself so you also get a copy every time the email gets sent out. Then, you process one email a time to deliver the gift to the sender.
Here's an real case example I just received using this approach:
Earlier last week, I was asked to implement an in-memory database similar to Redis (name-value pairs). This post is about code style, algorithmic performance, and thought process. For simplicity's sake, my program to the challenge will receive commands via stdin, and should write appropriate responses to stdout.
The word 'memento' refers to an object kept as a reminder or souvenir of a person or event. Memento pattern is a behavioral pattern in GoF because it captures and externalize an object's internal state so that the object can be restored to this state at a later time.
I come across a list of interview questions on the web for interviewing software engineers, or specifically, for coders.
What's the differences among a software engineer, a software developer, a programmer, and a coder?
It's arguable what constitutes a good developer. To me, it's the curiosity and the ability inside a developer to find and implement cost-effective software solutions that are easy to be extended by others. Knowing answers to the list below does not demonstrate the core ability of what I believe a good developer should have.
Coding ability is only partially relevant to become a good software developer. There are other factors like the ability to identify the problem, the ability to provide solution, and the ability to allow others to understand your thought process so that they can extend/maintain your code easiily.
Java Collection Framework (java.util.* package) is a unified architecture for representing and manipulating collections. This post is a quick note of my knowledge about Java Collection Framework that covers frequently used java data structure to store a group of elements and/or key-value pairs. In the java.util framework, there are two major camps - Collections & Map.
To illustrate, I use solid lines to denote 'extends', and dash lines to denote 'implements'. The way to use my note is to first go to the diagram looking for the specific class or interface, then read the brief blurb that'll remind you what the class or interface is about for the right data structure.
There is a wall of size 4xN. You have infinite supply of bricks of size 4x1 and 1x4 in the house. How many ways are there to fill out a wall of size 4xN?
This can be addressed by dynamic programming. The characteristics of optimal substructure, recursive nature, and bottom-up approach were mentioned in this post.
Let's say, number of ways to fill out a wall of size 4xN with infinite supply of 4x1 and 1x4 bricks is said to be f(N). Per common sense, we know:
f(1) = 1
f(2) = 1
f(3) = 1
f(4) = 2
Also, when you think about it when filling out 4xN with f(N) ways of doing it, you can break f(N), when N >= 4, down to 2 substructures as below. Given the fact that one 4x1 can goes either horizontally or vertically. When it goes horizontally, there's only one way as shown in f(N-1). But when it goes vertically, all other 3 bricks may need to go vertically as well as seen in f(N-4) below.
Other than remote login, there's various useful things you can do with ssh, like running a remote command, multiplexing connections to save on server resource, setting up ssh aliases to save you some keystrokes, and so forth.
Recently, when my partner logged on a recently created CentOS server hosted at Digital Ocean, he saw the following messages:
Last failed login: Tue Jul 29 16:27:31 EDT 2014 from stuff2share.net on ssh:notty
Clearly that wasn't us trying to log in. Obviously, there was some malicious user(s) likely trying to enter our server with brute-force attacks. We were under a ssh brute force attack. Such malicious scan is not uncommon these days. It came just a couple days after our new server was up.
I learned a few good ways to prevent this: