The sparrow is complete

It is a time of change. Some people give up and wait for changes to happen to them. Some people take action and make changes happen. Don’t be the former.

Previously, I summarised the recent developments in the online business world. Despite the opportunities available, it’s still easier to just sit back and do what you’ve always done.

There’s a quote from Twyla Tharp, a dance choreographer about creative blocks.

Do something. Anything.

The point is to get something done, even if it doesn’t specifically solve the problem you have right then. That gives you a sense of accomplishment, a feeling of progress, and you can channel that into doing more actions and eventually you’ll get to fixing your creative block.

Some people wait for the stars to align before doing anything. Some people wait for all the traffic lights to turn green before doing anything.

Sure your financial situation isn’t ideal. Sure your mother-in-law keeps breathing down you neck. Sure your work hours aren’t quite what you want. Sure you might like to have more space in your home.

But if you wait for everything to be perfect, you’ll never get to making that baby. Do you want to make babies or not?

There’s a Chinese saying that goes something like “The sparrow may be small, but it has all 5 major organs.” I don’t know what those internal organs are, probably heart, lungs, brain, kidney, liver?

The point is that the sparrow is complete, small as it is. It functions. It can fly, it can eat, and it can continue to make small baby sparrows.

In the business context, people almost always want to know more before starting. But the only real way to find out if you need to know something, is to start and then find out that you need it. Until you’ve done a task yourself and find it distasteful, you don’t really need to outsource it. Until you’ve answered customer questions, you don’t know how your customer service officers should behave.

Make a sparrow first. You can tweak it into an eagle later on.

Recent waves in online business world

By “recent”, I mean maybe up to the last couple of years or so. Let me start a little earlier than that.

When blogging became hip, there were programs (read: paid products) that teach you how to blog, how to write effectively, how to get your blog to be read.

And on the last note, website traffic became important. So there were programs (read: paid products) that teach you how to get traffic to your website. More importantly, how to get targeted traffic, because casual passers-by were next to useless for business purposes. Just look at all the traffic from Digg and StumbleUpon and Reddit and other social media sites. People come, look at your post, then leaves. That’s pretty much useless.

So creating an email list became imperative. You want to capture people’s email addresses so you can talk to them. If they sign up, then they want to hear from you. This is what Seth Godin would call permission marketing. But beware! There were some WordPress plugins that set annoying pop-ups that has a sign up box for people to put their email addresses. This pop-up happens either on finishing reading a post, or worse, on leaving a page. That would be “annoyance marketing”.

Then came teaching programs (read: pai… ok, you get the idea), that teach you how to teach a topic. The main one is Teaching Sells. The idea is that people will want to pay to learn something useful (and probably turn it into something profitable).

And on that note, videos were becoming popular, what with the increased bandwidth that most people have. And that some people like to see a person talking to them, instead of reading text or hearing audio files. So there was this product called Video Boss (I think). It teaches you (see previous paragraph) how to shoot, edit and upload a video. There were all sorts of information in that product, going so far as the minute details such as making your video visually interesting and lighting setups and so on.

Then there was the app craze, popularised by the iPhone. “Create apps. Become millionaire.” says some paid products (or to that effect anyway). If you’re a developer (which you probably are if you’re reading this blog), then be aware of what you’re creating. Create and sell apps if that’s your thing and that it’s working for you, not because someone says it’s the in thing.

Then there was the Kindle revolution, changing how people read. You can now self-publish on Amazon and push your ebooks out to millions of Kindles in the world. And make a bit of money from every ebook you sell.

The app thing and the Kindle thing have two things in common. They both relieve you of payment processing, and they both let you leverage an existing platform. Apple’s App Store for iPhone/iPad, Windows Store for Windows apps, Google Marketplace for Android devices, BlackBerry App World for Blackberry devices. And Kindle for well, Kindle devices.

Somewhere in those times, there was a need to know how to launch your product. I’m not talking about hype (or just hype anyway). I’m talking how to get sales from your product launch, how to get maximum impact. There’s this product called Product Launch Formula (by Jeff Walker) that teaches you how to do this.

I subscribe to many of these people’s email lists, so I get emails whenever whatever. Some are useful, some are interesting, some I just delete because it’s an obvious sales email (after you receive as many emails of such nature as I do, you can tell from the subject line or within a couple of sentences in).

There’s a point to all this. And I’ll tell you in the next post.

A research/questionnaire project

Hey you! Yeah, you. If you’ve been reading this blog for a while now, thanks! If you’re new, welcome!

In any case, I’m doing a research/questionnaire project, and I’d like your help. You just have to answer these questions:

  • What are your biggest frustrations/problems right now?
  • What do you want to learn about right now?
  • What ebooks do you read (or would like to read) on the Amazon Kindle (or other ebook reading devices)?

Your answers don’t have to be specifically related to software development. Send your answers via email or use my contact form if you’re into that kinda thing. I’m not accepting comments because I don’t want everyone to see your answers. I’ll be compiling a summary and sending it to you if you help me answer, so commenting here won’t be useful.

My email address is
vincent (at) polymathprogrammer [dot] com

Lesson learnt on the Internet: Repetition. Send your answers to me via email or use my contact form. I’ll compile a summary and send it to you.

Much appreciation and gratitude to you. Have I mentioned I’ll be compiling a summary of other people’s answers and sending it to you? Thrice I’ve said it, and thus let it be done.

How to lessen fear of public vlogging

Public vlogging is like public speaking. Except it might be worse. At least with public speaking, you’re talking to people. With public vlogging, you’re talking to a camera. I’ll let you decide which is worse…

There was a time when talking into a mobile phone was weird because you don’t look like you’re talking to anyone. Now everyone and their grandmother is on a mobile phone. There might come a time when recording videos is commonplace, whether at home or in public.

Do we still have those guys with Bluetooth earpieces?

Compression through time

So the last time, I told you I came up with my own video format so I could load videos into my game engine. Today, I’m going to tell you what it is.

The concept isn’t revolutionary. Image compression is the art of expressing an image in as small a form as possible. There are 2 versions: lossy and lossless. Lossy compression means some data is lost, meaning the file size can be smaller, but overall you won’t notice the difference (much). The jpeg format uses this. Lossless compression doesn’t lose any data at all. The png format uses a lossless compression.

I don’t know much about video compression. However, a video is a series of images. So what I did was instead of focusing on image-by-image compression, I adopted time-based compression.

For each pixel position, I try to come up with an algorithm (or specifically a maths formula) that will represent all the pixels in that pixel position throughout the entire video.

Let’s say we use the top-left pixel of the video. And let’s say that pixel is pure white for half of the video, and black for the other half of the video. My aim is to represent this “pure white 1st half, pure black 2nd half” information in 1 formula.

With this in mind, let’s say I’ve got a maths formula somehow. Let’s say it’s a 640 by 480 pixel video (it was considered good resolution back then. I know we have HD now…). Let’s say there are 3 variables in that maths formula. This means, I have to store 3 * 640 * 480 variables in my movie format.

Yes, that’s the compression tactic.

Well, more specifically, I had to come up with 3 * 640 * 480 maths formulas that compresses itself as efficiently as possible. With some research, I found that the less the variables vary (hahahah…), the better the compression. This means the colour space I use is important. RGB values change too much.

And with some more research, I found the YUV colour space ideal for use. I think what I actually did was count the number of consecutive values and store that. The YUV space has a “lightness” component, which for most videos, doesn’t change very often.

This means in the ideal case, I store “N of X” for the “lightness” component, where N is the number of times the value X occurs for the “lightness” component of that pixel position. And in the ideal case, N would be approximately the frame rate multiplied by the number of seconds.

So for each pixel position, I store a series of counts of the Y component (could be 10, 50 or ideally just 1). Then I store a series of counts of the U component. And similarly for the V component.

Then I move on to the next pixel.

The idea is that the longer the video, the “better” the compression. It’s not that the compression tactic is better. It’s just that the tactic takes advantage of the fact that certain colour components don’t change much. If a pixel is always white, it doesn’t matter if the video is 1 second long or 1 hour long, we just store “30 white” and “3600 white” respectively (assuming 30 frames per second).

This works great for screencast videos because the screen typically doesn’t change much. It’s usually just the mouse moving around and clicking stuff and sometimes the screen changes. This means most of the screen stays the same. And if you’re like me, you’ve probably watched some screencast videos where nothing on the screen happens for minutes. It’s just the person talking.

Of course, I fudged the actual values a bit so they can compress better. Meaning it’s a lossy compression. But in the end, it was comparable to a moderately compressed QuickTime movie file, so I was ok with that.

But even if the compressed size is still larger than other movie file types, at least it’s not copyrighted. So I can use that. And if you want to try this compression method, go ahead and use it (you have my permission). Let me know how it works out for you.

Compression and space

Back when I was in my making games mode years ago, I was interested in space. Specifically data storage.

Blitting images to the screen as quickly as possible to keep the frame rate consistent was a thing. Texture images are pre-created. Then there’s the concept of generating textures as the program was executed. This was how demos pack data into a small space.

I was studying fractals then, the iterated function system was a thing. I found it a pain to implement though…

And then I was interested in having moving images in my game engine. Packing movies was way harder than images.

Due to the copyrights of all the video formats, in my infinite wisdom, I decided to create my own. I mean, it’s a series of images, right?

The resulting customised movie file was just slightly larger in size than the QuickTime .mov format. I took that as an encouragement. I’ll tell you what I did next time.