2014

It’s 2014.

This year will be a year of building up habits.
Building up the ones that I’d like to have.
My goal, at the end of the year, is to have these habits built up:

  • Workout
  • Sleeping/Work
  • Hygiene

Just 3 things.

Workout/Diet
I’ve managed to find a workout routine to stick to.
It’s simple and easy to follow and it’s beginner-friendly. I hope to follow through with this until my membership expires on April and by then, should have a good enough habit base that getting a continuing membership is a no-brainer. I’m happy to teach anyone who’s interested in the program. :)

Diet is still a tricky thing for me. I’m getting back into recording my meals in My Fitness Pal.

Sleping/Work
Sleeping/Work habits is just different sides of the same coin. Right now, I wake up at around 10 to 11 AM. I’m only able to work by 2pm and I stop at around 6pm until 12 midnight, where I go to the gym between 10PM and 12MN. From there, I try to get into the flow again until I become sleepy, which is around 2 to 3AM. Oftentimes, I’m left with the feeling that nearly my whole day went out the window.

I want to change that habit to something like: Wake up at 5AM, work until 8AM, have breakfast, work on non-coding stuff between 9AM until lunch, 1PM to 4PM should be coding work again and the rest of the day will be spent on dinner, gym and leisure. Not married to the actual times, but it’s more of being awake more in the day and spend more of the evening actually sleeping. I actually like being up early in the mornings. I just don’t like getting up.

I also want to incorporate daily reviews to what I’ve accomplished in the day and what I need to do the following day.

Hygiene
I’ve got my hygiene regiment down, I just have trouble sticking to it every time.

Okay, I’m sleepy!

Have a happy new year everyone!

Making Squid a transparent proxy

..has absolutely nothing (almost) to do with Squid.

It’s a single firewall rule like so:

-A PREROUTING -p tcp -m tcp -i wdev0ap0 --dport 80 -j DNAT --to-destination 127.0.0.1:3128

That’s an IPTables rule, normally but Arch (at least the version I was working with) was using UFW so that goes inside my before.rules in /etc/ufw/before.rules, right at the top.


*nat
:PREROUTING - [0,0]
-A PREROUTING -p tcp -m tcp -i wdev0ap0 --dport 80 -j DNAT --to-destination 127.0.0.1:3128
COMMIT

Make sure to restart ufw.

ufw disable && ufw enable

From Squid side, you just have to make sure that Squid is listening to a port transparently.
Change
http_port 3128
to
http_port 3128 intercept.

That should do it.

—-

I wanted to use a FQDN for the splash page though, so we used DNSMasq for DNS.
pacman -S dnsmasq

Then we just edit the /etc/hosts file and put in the FQDN that we want to map to the local IP (not localhost). Of course, this only ever works if your device has a static IP (which it should).


#
# /etc/hosts: static lookup table for host names
#

#
10.1.0.1 rystraum.com
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost

# End of file

In order for you to use the DNS on the device, you have to make it your first/default DNS. So, configure that on your network settings.

From here, I can change the Squid splash page config accordingly based on where my allow access page is.

Next steps:

  • Pass along default DNS setting during DHCP
  • Start squid and dnsmasq on startup
  • Remove Node.js apps from startup
  • Install Nginx
  • Map default Squid error page from the static HTML error to default web server on localhost (might not be needed)
  • Dealing with SSL on a transparent proxy setting
  • Changing upstream from eth0 to usb dongle

Thanks to Madumlao for all the help. :)

The key to happiness: a good bed, nice chair and healthy food

If you want to spend on yourself, here’s what I suggest you spend on: A good bed, nice chair and healthy food.

(Ha! I bet you didn’t see that coming!)

This image would explain everything.

Yes, that's the same image as the featured image.
Mmm. Pie.

My list of “things to spend on to invest in myself” is much longer. Those were the top 3.

Breakdown

I amortize costs over the lifetime of the product. I often say, if I spend X amount on this and it lasts me Y (months/years), then I’m just paying Z per (minute/day). Sometimes, I say, if I spend X amount on this and I use this Y number of times, then I’m just paying Z per use when applicable. This way I can compute costs on a daily/monthly/basis.

I’m a believer of YAGNI so I don’t really buy the latest and the greatest (read: most expensive) unless I need them. I fall right in the middle/upper-middle most times. Just enough for my needs, and some bells and whistles.

My longer list with approximate cost ranges is as follows: (All figures in Philippine Pesos)

  1. Good bed, read: mattress (3k to 9k over 3 years or 2.75 to 8.25 per day)
  2. Nice chair (2k to 6k over 2 years or 2.75 to 8.25 per day)
  3. Healthy food (200 to 300 per day)
  4. Flattering clothes (15k to 20k over 1 year or 41.00 to 55.00 per day)
  5. Fluffy pillows (500 to 1k over 1 year or 1.50 to 3.00 per day)
  6. Decent Keyboard & Mouse (1k to 2k over 1 year or 3.00 to 6.00 per day)
  7. Good enough desktop/laptop (20k to 50k over 3 years or 18.50 to 45.75 per day)

I’ve prioritized the list using these reasons:

  1. Bed: The effects of quality sleep affects your every waking hour.
  2. Chair: Good posture is a sort of “prevention is better than cure” thing. More short term, it helps alleviate building up of stress which would affect your quality of work. This also contributes to quality of sleep.
  3. Food: It keeps you alive. Why not spend on it?
  4. Clothes: Find the kind of person that you want to be, and dress like him/her. Imitation is the highest form of flattery or Dress for the kind of job you want, not for the job that you have. The clothes make the man. Or it doesn’t. This deserves its own post.
  5. Pillows: Goes with the bed.
  6. KB&M: My hands are my bread & butter. RSI and CTS can be literal career-ending injuries.
  7. Workstation: I spend at least 8 hours on this thing. I would want to have enough for what I need.

That comes out to 269.5 to 426.25 per day or 8,085.00 to 12,787.5 per month. [1] Factor in bills, rent and other consumables and you’re looking at close to 15,000 to 20,000 per month to live a comfortable life. [2]

I’m at this point in my life wherein I’m content, materially, with everything I have so far. The only significant purchases I have left are a laptop replacement, a vehicle and a house. The last 2 are just luxuries with my current lifestyle and wouldn’t probably buy them for myself anytime soon (i.e. in the next 3 years).

Optimizing for happiness

Happiness is having everything that you need in the world. The first step to being happy is finding out the minimum that you need. It’s entirely subjective.

The next step to happiness is optimizing the these things that contribute to your daily well being. If you feel well enough on a daily basis, then I think you’re 80% there to general happiness. [3] The rest is tougher to crack: healthy relationships, sense of purpose, et al. But it sure becomes easier once you’ve got a solid base.For the low low price of Php 20,000 a month, I can pursue the rest of my 20%.

Am I happy? Currently, yes. But it’s a process.


[1] I actually have another round of computation, wherein the costs are weighted based on how much I use the thing. I’m being lazy so I didn’t include it.

[2] This is for a single, no dependents person. For a family that is sharing a lot of the things above including rent and utilities, this would be significantly less per person. But of course, you’d have to multiply per head so it comes out larger in lump sum.

A totally pulled-out-of-my-ass formula is : x = number of people, amount = x * 20,000 * (0.9 ^ x). This yields:

1 20,000.00
2 32,400.00
3 43,740.00
4 52,488.00
5 59,049.00
6 63,772.92
7 66,961.57

[3 ]Pareto principle, the 80-20 rule. Generally speaking, 80% of output, comes from 20% of input.

Motivation and Decision-making

I like reading about psychology. Especially psychology related to motivation and decision-making.

Here are some links that I find myself visiting time and again. Some of them, I can relate with (to some degree) while others are references I come back to time and again.

Featured image care of Marco Bellucci

Obligatory Birthday Post — 24 of ???

It was more of a birthday weekend, more than anything.

I did not have any plans whatsoever. All I knew was that I was pretty tired because of the week that just ended.

I’d like to thank everyone who were there during my “surprise” birthday party.

My labs, Angel — thanks for the birthday gifts and for all the love. <3
Our head honcho, Ma’m Deng and Julianne — double thanks for arranging everything!
Joanna and family
Madumlao and Alex — thanks Mark for the cake!
Jerix, Gerry, JP and Liz
Karl, Allan, Jeffrey, Rexell and Tandz
Kenan and Matt

I spent the whole of Aug 18 with my family and my dogs. We went out and watched Percy Jackson.

It’s raining pretty hard outside though.

I’ve got a lot more in my mind, but I’m sleepy.

The Un-fun game of eRepublik

I play Erepublik and have been playing consistently for quite some time now.

Okay, playing is probably an overstatement. It’s more accurately described as I’ve-been-logging-in-and-clicking-around-10-times-before-logging-out. It’s an exercise in patience.

After doing the usual routine (which takes me probably a minute), I always stop and think what exactly this game is missing. It’s got a very engaged community, decent UI and I would presume sustainable enough sales.

It’s not fun.

Trading effort for progress

There’s only trade a lot of money for a little bit of progress.There’s no mechanism for me to put in effort to gain a little bit more of progress ahead of everyone else that does the bare minimum (login, work + train).  This kind of reminds me of Neopets at the other extreme, where there’s just so many things to do that you can easily sink a whole day in it and not be done with everything you can do daily.

Some of my ideas here are:

  • Side stories / side quests
  • Make training much more interactive
  • Make working much more interactive

Predictability

One other thing that makes it not-fun is that everything is predictable. There’s absolutely no chance involved. The larger a country is, the more population it has, the more resources it produces, the more territory it can conquer. This is a 100% sure thing.

On the other hand, small countries’ (like ePH) resistance wars is an exercise in futility.

What a huge thing a +- (1-10)% random bonus per war could give both sides. It would make war strategy much more exciting other than “I need to have more people/energy bars than the other side have.”

Some of my ideas here:

  • War module: random bonus/penalty (based on RL weather?)
  • Economy module: production bonuses/penalty (based on RL stock market?)

Simplicity

Erep’s simplicity undermines its potential.

The economy sucks because it’s too simple. There’s not enough room for players to turn a profit. The only ways to turn a profit is either build Q6-Q7 weapons factory and hire other people or buy from major markets and sell in smaller markets.

The war module kind of sucks because it’s too simple. There’s not much strategy further than “we need to find more high str players with lots of bars/weapons than the other side”.

Daily activities suck because it’s too simple. I just need to go work for the highest bidder and work everyday (read: click the work button). I just need to level up my training grounds and train everyday (read: click the train button).

The political system sucks because it’s too simple. Everything is entirely subjective and lawmakers are not given insight to country data to effectively address macro-level issues. Analytics over time would be a huge boon to proper lawmaking.

“Make it as simple as possible, but not any simpler.”


Erepublik is kind of enviable in a way that despite the game’s deficiencies, people still stick to it. It’s community finds fun within its own meta-game. For a game developer however, I think that’s a pretty pathetic state to be in.

Hopefully, there’s no other way to go but up. Unless Plato suddenly gets one of his bright ideas.

Opportunity Cost

One of my favorite micro-economic concepts is opportunity cost.

Simply put, if I have a limited resource, the total cost of spending that resource on something is the face value plus all the foregone opportunities by spending that resource on something else.

It’s highly personal because it has been one of my driving factors on why I still am not back in school.

I still had 2 more years to go before I graduate (assuming I didn’t fail a subject). When I had thoughts to go back, I kept on thinking, “What can I do in those 2 years?” and so many things come up.

I could learn mobile.
I could be better at getting customers.
I could be better at keeping customers.
I could learn more design patterns.
I could study how to keep engineering talent.
I could do this and that.

I could learn more by spending my time somewhere else. The underlying truth is, I didn’t want to be a computer scientist as badly as I wanted to be other things. If I wanted to learn specifically about computer science, sitting through lectures is probably the most efficient use of my time. But it’s not what I want to be.

10,000 hours of deliberate practice is what it takes to master anything.The best time to plant a tree was 10 years ago. The next best is now. You become good at things where you spend your time [1]

Are you spending your time on things you want to master?

[1] There’s an argument to be made here between talent and hardwork, but that’s a topic for another day.

I have a nagging feeling that I’ve written about this before already.

Featured image by G.X. He’s 12 years old now.

The Problem with MLM

Disclaimer: As with any generalizations, what I’m about to say may not be applicable to every possible case there is. It just means that these things happened to a lot of people often enough that it probably is the general case.

I don’t really mind people selling me stuff. I bought a couple of games in the last Steam Summer Sale. I sometimes take up upsell offers on fast food. I entertain sales people when their product looks interesting.

The problem with Multi-Level Marketing is it’s disproportionate focus on recruitment. This plays a large role on how we perceive MLM (deceitful, scammy and general mistrust) and probably affects how the product is perceived.

This disproportionate focus on recruitment is reflected in how recruiters draw people in:

The top-earning person in the PH earns <insert number greater than 500,00> per month after just 3 years in the company. See that guy with the 1,000 peso bills fan? That’s my upline. Here’s his upline with his BMW car. Work hard enough and you can be exactly like them. If you just get 3 people per month, and do so consistently for a year, you’ll be earning so-and-so per month. Oh, here are our products, by the way.

Of course, I’m exaggerating but recruiters’ pitch kind of feel like that. I wouldn’t be surprised if someone pitched like that almost verbatim.

The pitch is designed to make you feel envious. To make you want to be like the ones you see. It’s designed to get you to sign on the line that is dotted. (By the way, watch that entire clip. Best. Salesman. Ever.)

If you compare insurance sales and MLM organizations, they are structurally similar. The crucial difference is that in a product-centric sales organization, a huge proportion of their marketing/training/sales materials and tools are about pushing the product. This isn’t to say that insurance companies are better at selling. Some fail miserably at this. But at least you know they’re trying to sell you a product. With MLM, you’re never sure exactly what they’re selling you.

If I were to join an MLM, this would be my business model:

  • Let’s assume that the products are legitimate
  • Acquire products for a discount
  • Mark it up, and sell it for some profit
  • If someone was interested in selling the product and was really passionate about it, then I would invite them to be part of my downline

That’s essentially a distributorship. If recruiters used that as a model, they’ll have a hard time recruiting people. It’s much harder to sell a business than a get-rich-fast dream. Oddly enough, the get-rich-fast dream they’re peddling you requires just as much time and effort but requires you to sacrifice some of your social capital.

As with any business, that model is going to take a lot of work and time. Time and effort that I’m not prepared, nor can I afford, to put in right now. If I’m going to sell something, give me software to sell. That’s right up my alley.

You know what they say, if a deal sounds too good to be true, it probably is.

 

End notes:

I came across this in my research:  What’s wrong with Multi-level Marketing? and when I read that, I almost didn’t want to publish this post because they touched on all of my points (and more) more elegant and comprehensively than I did. So go read that. It’s pretty long though, so click only if you have time to spare.

Some more points I wanted to put in but was having a hard time refining:

  • Spending 2 to 3 years working on something guarantees that you’re going to get good at it. Recruiting people included. Are you willing to spend the next 2 to 3 years on this?
  • Getting people to come into orientations will work in the short run, but it would drain your social capital. How much social capital are you willing to exchange?
  • Some of the right reasons to join an MLM: gain sales experience, actually want to sell the product to other people
  • Sales is not for everyone. Dragging people in to turn them into salesmen is irresponsible.

 

Featured photo from .faramarz

TBCF – Technical Business Co-founder

I code. I pitch. I manage systems. I help structure deals. I fix networks. I negotiate. I write tests. I manage projects.  I manage scope creep. I document.

I’m primarily a technical person, but I understand business really well.

I’m made for startups.

I’m learning, and this is where I write.

Hello world!

I was supposed to make a backup. I was supposed to transfer my hosting from my original host to my own account (I run a sorta hosting business).

“I’ll get around to it”, that’s what I said.

Then finally, my host just quit cold turkey and I couldn’t pull out my DB. My last back up was May 2010. I’m fucked.

Procrastination: 1, Me: 0.

So, here we are, starting from scratch. I think this may be better, in some ways.

I’ll probably dig around my back up one of these days.

I’ll get around to it.