Skip to content

Code Capsule Posts

Kir: find commands by describing them from the shell

When doing system administration to fix a crash on some Unix-based server, I have run several times into the issue of trying to remember how to perform a certain task, but not remembering the exact sequence of commands. After that, I am always doing the same thing, and I have to resort to do a search on Google to find the commands I need. Those tasks are generally not frequent enough to be worth it to memorize the commands or create a script, but frequent enough for the process of searching to become really annoying. It’s also a productivity issue since it requires me to stop the current workflow, open a web browser and perform a search. For me, those things include tasks such as “how to find the number of processors on a machine” or “how to dump a Postgresql table in CSV format.”

I thought that it would be great to have some piece of code to just be able to query Google from the command-line. But that would be a mess, as for each query I would need a simple sequence of commands that I need to type, and not a blog article with fluffy text all around which is what Google is likely to return. Also, I thought about using the API of commandlinefu.com to get results directly from there. So I did a small Python script that performs text search that way, but the results were never exactly what I was looking for, since the commands presented there have been formatted by people who do not have the exact same needs I have. This is what brought me to implement Kir, a tiny utility to allow for text-search directly from the command-line and give the exact list of commands needed.

Implementing a Key-Value Store – Part 1: What are key-value stores, and why implement one?

This is Part 1 of the IKVS series, “Implementing a Key-Value Store”. You can also check the Table of Contents for other parts.

In this article, I will start with a short description of what key-value stores are. Then, I will explain the reasons behind this project, and finally I will expose the main goals for the key-value store that I am planning to implement. Here is the list of the things I will cover in this article:

1. A quick overview of key-value stores
2. Key-value stores versus relational databases
3. Why implement a key-value store
4. The plan

Europe is not ready for drop-shipping

I heard about drop-shipping for the first time a few months ago, when I stumbled upon an AMAA on Reddit with some guy claiming he was making $100k per month running drop-shipping websites. This guy also apparently verified the information with some mods of the AMAA sub-reddit, and provided a short introductory guide to drop-shipping that he later removed. Lucky me, I also bookmarked the link to the guide when I bookmarked the AMAA, here is the guide he made. The guide includes, at the very end, a list of the companies that he is using for his marketing. Some comments on Hacker News about this AMAA said that this looks like a scam aimed at promoting those companies.

After reading the post on Reddit, I started to look into drop-shipping as a possibility for creating a small business that would generate small but steady revenue. I already explored other options, as documented in a previous blog post about micro-ISVs. Here is what I found and what I think about drop-shipping.

Immersive design and the power of visualization

Some websites and web apps are using what I call “immersive design.” I have been researching blogs and magazines in hope for a proper name, and it seems that it is referred as “full-screen background“. I do not like this name because I do not find it descriptive enough. Technically, all backgrounds are filling the full screen, otherwise websites would look like crap. So I had to come up with my own name, immersive design, and a definition for it:

Immersive design is the use of a full-screen background image as the main design feature in a website, with the goal of creating a strong emotional impact on the user.

The term “immersive” puts more weight on the intent rather than the means. A full-screen background image is just a technical detail. The feeling of emotional immersion in the website is the real marketing value.

In this article, I am explaining why I am convinced that immersive design is one of the strongest yet underrated on-line marketing tools. I am also showing a few examples of immersive designs that I have been collecting while surfing the Internet.

How I successfully tested and rejected two niche markets using online surveys

I recently got some interest for micro-ISV projects (micro independent software vendor). These are small products/startups that require minimal time and financial investment, and generate small but steady revenue. The idea is that I would not build it myself, I would outsource it so that I can focus on other things than code. The time investment I am aiming at is around 4-6 hours per week. I am now researching niche markets in an attempt to create my first micro-ISV.

The paths followed by successful micro-ISVs have similarities, as they all include testing the market before doing anything else. Testing can take various forms, it can be a sales website, a prototype, or even a shadow product (faking the product and doing the computer’s work by hand before spending time actually coding the product). I recently had a couple of ideas for micro-ISVs and I wanted to test them before building anything, instead of wasting time coding something nobody wants. So here is at the story of how I tested and rejected two niche markets using online surveys. Please note that I am not explaining how I designed the surveys, but just what was the process of using surveys as a way to test niche markets. I will cover survey design in a future article.

I am tired of logging into websites

With the number of Internet services and web apps growing, the amount of statuses and indicators is itself growing. At the end of the day, you end up logging into 20 different websites in order to get a single value from each of them. And there are so many of them, just to name a few: StatCounter, Google Analytics, Apple iTunes Connect, Flurry, etc.

I am really getting tired of logging into all these websites, and here is my plan to fix it.

How to implement an algorithm from a scientific paper

This article is a short guide to implementing an algorithm from a scientific paper. I have implemented many complex algorithms from books and scientific publications, and this article sums up what I have learned while searching, reading, coding and debugging. This is obviously limited to publications in domains related to the field of Computer Science. Nevertheless, you should be able to apply the guidelines and good practices presented below to any kind of paper or implementation.