So much hate to the point it just seems silly

TL;DR: Buy things that suit your needs well and shut the hell up unless someone asks for your opinion.

I don’t mind when people bash Apple’s products if they have good reason.

But nowadays people are doing it simply because it’s cool to do so.

It hurts a little when you’re targeted because of the other fanatics who believe in the same brand as you do, and yet you’re not as extreme as them.

Now I know how some Christians feel when I used to show my dislike towards their religion. (This happened during the days when I was young and foolish!)

Because these situations are so similar.

I used to dislike Christianity because of some extreme believers pushing their beliefs onto me, but then I learned that not all Christians are like that.

Hey, I’m just a regular guy who’s eager to give up his money for products that work well, for content that entertains me well, for services that serve me well.

Louis CK said it best. Everything’s amazing, nobody’s happy.

CounterStrike

Recently, I began playing CounterStrike:Source again for nostalgic reasons. It’s also the only FPS game I could play without feeling nauseus after 20 minutes.

I’m sad at how it’s difficult to find a decent server with low latency. I hope this changes when I get a fiber connection probably by the end of this year.

And when I find a low-latency server, it’s always set to a fixed map (de_dust2), or it has weird mods like instant-respawn.

When I finally found one with the traditional settings, it’s a high-latency server.

Anyway, I found one that’s frequented by Singapore players, low-latency (20~30ms) and default rules, even had friendly fire turned on. I love it here so far.

Everyone plays according to the rules. Counter-Terrorists actually play according to the aim of the map (defend bomb-sites, rescue hostages), instead of rushing to eliminate Terrorists. Terrorists actually try to secure the bomb-site to plant the bomb instead of camping at their base.

Probably because this is a very old game. All the young hooligans that don’t like to play by the rules of the map have all gone up and left for newer games like Dota or Diablo 3. Only the ones that truly enjoy the basics of the game remain.

The server’s name is so aptly named: Old Man Gang.

Money management

Someone on HN asked for some money management advice and so I’d thought I’d copy and paste it here with some edits.

I’m from Singapore so some of the points below may not apply to you but here’s what I do in case it helps.

I bought an iOS app which I use to track my income and expenses. This doesn’t help me save money except track how much I’ve spent on my credit cards so I don’t overspend and will have enough money to pay back the banks at the end of every month and not incur any hefty interest.

Credit cards are useful for getting discounts on things. I get a 5% discount when I shop for groceries at a particular store. When the annual fee comes, I call up the bank and ask for a waiver. They usually agree to waive it off.

I have 2 bank accounts with different banks. The first one which is where I use for spending on everyday needs and depositing my salary. This bank, POSB, is known for having lots of ATMs and conveniently located branches. But lousiest interest rate. I keep a buffer of around $1000~2000 in this account in case I need to spend extra in a single month.

The second one is for savings it’s MayBank and gives me a better interest rate but not a lot of ATMs. I setup my first bank account to automatically transfer $500 every month to this savings account. This recurring transfer is also setup on the iOS app I mentioned earlier.

I also have a strong discipline not to touch the amount in my savings account unless I really reaaaally need money. I might be able to grow more money investing this sum but it usually means I can’t touch it for a long period of time, say 5, 10 or 20 years. What if something goes wrong and I need the money badly?

I have a savings insurance plan which after paying a small monthly sum for 20 years, I end up with a huge sum more than the amount of premium paid when it matures.

On google docs, I noted down what my regular expenses are, like transport, food, household bills. So I know how much extra I will have after those.

Don’t be tricked by discounts that tell you how much you save if you buy that product. You save more money not buying it. It’s different if the product is a daily neccessity or you think will be beneficial.

If I were you, I’d build up a substantial amount of savings first before investing. An amount that will allow me to go jobless for a few months.

Or allow me to do things that’s beneficial to myself in the long run such as buying a camera to learn about photography. It’s what they call “investing in yourself”

Work/Play Balanced

I work 52 hours a week.
Took up 2 freelance projects.
Attend Japanese lessons every Saturday morning.
Have a few personal web projects of my own to work on too.

But still, at the end of everyday, I feel happy.
Because I enjoy everything I do listed above.

It’s a good time to be a web developer.

I do have other forms of fun too. Friday evenings, Saturday noon onwards till Sunday night is strictly reserved for gaming and movies.

Hosting websites on an AWS EC2 micro instance

A few months ago, I signed up for an account with Amazon Web Services to take advantage of the first year free usage on EC2.

It was a great learning experience as I get to configure everything in detail.

With shared hosting, someone else does the setup and maintenance for you. You can configure a few things in detail but you can’t have full control. It’s like public transport, you cannot change the parts in the vehicle, but you can choose where you want to sit, but you have to share the ride with a lot of strangers.

And it sucks if you have to share it with a serial fartist. i.e. Some silly person who took down the whole server with poorly written codes that take up lots of CPU, or whose website is the target of a DDOS attack and all other websites on the same server got brought down with it.

There’s also co-location and dedicated hosting but those are not affordable to the average web developer.

Then comes the age of cloud computing.

You get full control of a server at the cost slightly higher than shared hosting. You have dedicated CPU and RAM resources so no other server on the same physical machine as you can affect you. (Though I’m not sure what happens if those servers get DDOSed).

Long story short, my shared hosting account with DreamHost was expiring and so I migrated my remaining sites to my AWS micro instance server and here’s the things that happened and what you need to do if you want to run multiple websites on a micro instance as well.

At first, I did not configure my Apache and MySQL installations to work on low RAM machines (micro instances get only 613MB of RAM). They came with the default configuration settings that are meant for dedicated machines that have higher amounts of RAM.

A micro instance does not have a swap file configured. You have to do it yourself and here’s a simple guide:

Switch to root and follow these steps to add the swap space –

Type the following command with count being equal to the desired block size:
dd if=/dev/zero of=/swapfile bs=1M count=1024

Setup the swap file with the command:
mkswap /swapfile

To enable the swap file immediately but not automatically at boot time:
swapon /swapfile

To enable it at the boot time, add the following entry into /etc/fstab:
/swapfile swap swap defaults 0 0

 

Source: Adding swap space to Amazon EC2 Linux Micro Instance to Increase the Performance

Next, edit your apache config file and look for the Server-Pool Size Regulation section.

Most likely you are using the prefork MPM. Reduce the MaxClients to about 10. This varies depending on how much RAM each process takes. From my observations, my httpd processes take up about 40M of RAM at most. So I use 10, which allows me to have 10 running httpd proccesses all taking up 400M of RAM.

It would also be a good idea to reduce the MaxRequestsPerChild to something around 1000 in case of memory leaks. Situations where a process takes up more than 40M of RAM and keeps growing.

Better explanation here.

Without the above. My apache kept spawning child processes so much that it used up all available RAM and my MySQL process got killed off frequently. That means all my sites that are database driven are immediately crippled.

On a related note, back when I was a child, I loved how I could change parts on those Tamiya cars which gave me the illusion that it would run faster. Looks like my fetish for performance tuning is still there.